Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: net/test/python_utils.h

Issue 2526553002: Fix net_unittests when run in a virtualenv. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | net/test/python_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_TEST_PYTHON_UTILS_H_ 5 #ifndef NET_TEST_PYTHON_UTILS_H_
6 #define NET_TEST_PYTHON_UTILS_H_ 6 #define NET_TEST_PYTHON_UTILS_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 9
10 namespace base { 10 namespace base {
11 class CommandLine; 11 class CommandLine;
12 class FilePath; 12 class FilePath;
13 } 13 }
14 14
15 // This is the python path variable name. 15 // This is the python path variable name.
16 extern const char kPythonPathEnv[]; 16 extern const char kPythonPathEnv[];
17 17
18 // Clears the python path, this is useful for test hermeticity. 18 // Clears the python path, this is useful for test hermeticity.
19 void ClearPythonPath(); 19 void ClearPythonPath();
20 20
21 // Appends the dir to python path environment variable. 21 // Appends the dir to python path environment variable.
22 void AppendToPythonPath(const base::FilePath& dir); 22 void AppendToPythonPath(const base::FilePath& dir);
23 23
24 // Return the location of the compiler-generated python protobuf. 24 // Return the location of the compiler-generated python protobuf.
25 bool GetPyProtoPath(base::FilePath* dir); 25 bool GetPyProtoPath(base::FilePath* dir);
26 26
27 // Returns if a virtualenv is currently active.
28 bool IsInPythonVirtualEnv();
29
27 // Returns the command that should be used to launch Python. 30 // Returns the command that should be used to launch Python.
28 bool GetPythonCommand(base::CommandLine* python_cmd) WARN_UNUSED_RESULT; 31 bool GetPythonCommand(base::CommandLine* python_cmd) WARN_UNUSED_RESULT;
29 32
30 #endif // NET_TEST_PYTHON_UTILS_H_ 33 #endif // NET_TEST_PYTHON_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | net/test/python_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698