Wizard
Software Engineering Project - Wizard
|
Classes | |
class | Subprocess |
Functions | |
SetEnvVar (env_var, value) | |
_ParseAndStripGTestFlags (argv) | |
GetFlag (flag) | |
GetSourceDir () | |
GetBuildDir () | |
_RemoveTempDir () | |
GetTempDir () | |
GetTestExecutablePath (executable_name, build_dir=None) | |
GetExitStatus (exit_code) | |
Main () | |
Variables | |
str | IS_WINDOWS = 'nt' |
str | IS_CYGWIN = 'posix' and 'CYGWIN' in os.uname()[0] |
str | IS_OS2 = 'os2' |
bool | _SUBPROCESS_MODULE_AVAILABLE = True |
str | GTEST_OUTPUT_VAR_NAME = 'GTEST_OUTPUT' |
str | PREMATURE_EXIT_FILE_ENV_VAR = 'TEST_PREMATURE_EXIT_FILE' |
environ = os.environ.copy() | |
TestCase = _test_module.TestCase | |
dict | _flag_map |
bool | _gtest_flags_are_parsed = False |
_temp_dir = None | |
Unit test utilities for Google C++ Testing and Mocking Framework.
|
protected |
Parses and strips Google Test flags from argv. This is idempotent.
gtest_test_utils.GetBuildDir | ( | ) |
Returns the absolute path of the directory where the test binaries are.
gtest_test_utils.GetExitStatus | ( | exit_code | ) |
Returns the argument to exit(), or -1 if exit() wasn't called. Args: exit_code: the result value of os.system(command).
gtest_test_utils.GetFlag | ( | flag | ) |
Returns the value of the given flag.
gtest_test_utils.GetSourceDir | ( | ) |
Returns the absolute path of the directory where the .py files are.
gtest_test_utils.GetTestExecutablePath | ( | executable_name, | |
build_dir = None ) |
Returns the absolute path of the test binary given its name. The function will print a message and abort the program if the resulting file doesn't exist. Args: executable_name: name of the test binary that the test script runs. build_dir: directory where to look for executables, by default the result of GetBuildDir(). Returns: The absolute path of the test binary.
gtest_test_utils.Main | ( | ) |
Runs the unit test.
gtest_test_utils.SetEnvVar | ( | env_var, | |
value ) |
Sets/unsets an environment variable to a given value.
|
protected |