tesseract v5.3.3.20231005
|
Classes | |
class | GTestOutputTest |
Functions | |
def | ToUnixLineEnding (s) |
def | RemoveLocations (test_output) |
def | RemoveStackTraceDetails (output) |
def | RemoveStackTraces (output) |
def | RemoveTime (output) |
def | RemoveTypeInfoDetails (test_output) |
def | NormalizeToCurrentPlatform (test_output) |
def | RemoveTestCounts (output) |
def | RemoveMatchingTests (test_output, pattern) |
def | NormalizeOutput (output) |
def | GetShellCommandOutput (env_cmd) |
def | GetCommandOutput (env_cmd) |
def | GetOutputOfAllCommands () |
def googletest-output-test.GetCommandOutput | ( | env_cmd | ) |
Runs a command and returns its output with all file location info stripped off. Args: env_cmd: The shell command. A 2-tuple where element 0 is a dict of extra environment variables to set, and element 1 is a string with the command and any flags.
Definition at line 224 of file googletest-output-test.py.
def googletest-output-test.GetOutputOfAllCommands | ( | ) |
Returns concatenated output from several representative commands.
Definition at line 241 of file googletest-output-test.py.
def googletest-output-test.GetShellCommandOutput | ( | env_cmd | ) |
Runs a command in a sub-process, and returns its output in a string. Args: env_cmd: The shell command. A 2-tuple where element 0 is a dict of extra environment variables to set, and element 1 is a string with the command and any flags. Returns: A string with the command's combined standard and diagnostic output.
Definition at line 203 of file googletest-output-test.py.
def googletest-output-test.NormalizeOutput | ( | output | ) |
Normalizes output (the output of googletest-output-test_.exe).
Definition at line 193 of file googletest-output-test.py.
def googletest-output-test.NormalizeToCurrentPlatform | ( | test_output | ) |
Normalizes platform specific output details for easier comparison.
Definition at line 142 of file googletest-output-test.py.
def googletest-output-test.RemoveLocations | ( | test_output | ) |
Removes all file location info from a Google Test program's output. Args: test_output: the output of a Google Test program. Returns: output with all file location info (in the form of 'DIRECTORY/FILE_NAME:LINE_NUMBER: 'or 'DIRECTORY\\FILE_NAME(LINE_NUMBER): ') replaced by 'FILE_NAME:#: '.
Definition at line 90 of file googletest-output-test.py.
def googletest-output-test.RemoveMatchingTests | ( | test_output, | |
pattern | |||
) |
Removes output of specified tests from a Google Test program's output. This function strips not only the beginning and the end of a test but also all output in between. Args: test_output: A string containing the test output. pattern: A regex string that matches names of test cases or tests to remove. Returns: Contents of test_output with tests whose names match pattern removed.
Definition at line 170 of file googletest-output-test.py.
def googletest-output-test.RemoveStackTraceDetails | ( | output | ) |
Removes all stack traces from a Google Test program's output.
Definition at line 107 of file googletest-output-test.py.
def googletest-output-test.RemoveStackTraces | ( | output | ) |
Removes all traces of stack traces from a Google Test program's output.
Definition at line 115 of file googletest-output-test.py.
def googletest-output-test.RemoveTestCounts | ( | output | ) |
Removes test counts from a Google Test program's output.
Definition at line 156 of file googletest-output-test.py.
def googletest-output-test.RemoveTime | ( | output | ) |
Removes all time information from a Google Test program's output.
Definition at line 122 of file googletest-output-test.py.
def googletest-output-test.RemoveTypeInfoDetails | ( | test_output | ) |
Removes compiler-specific type info from Google Test program's output. Args: test_output: the output of a Google Test program. Returns: output with type information normalized to canonical form.
Definition at line 128 of file googletest-output-test.py.
def googletest-output-test.ToUnixLineEnding | ( | s | ) |
Changes all Windows/Mac line endings in s to UNIX line endings.
Definition at line 84 of file googletest-output-test.py.
tuple googletest-output-test.CAN_GENERATE_GOLDEN_FILE |
Definition at line 256 of file googletest-output-test.py.
string googletest-output-test.CATCH_EXCEPTIONS_ENV_VAR_NAME = 'GTEST_CATCH_EXCEPTIONS' |
Definition at line 50 of file googletest-output-test.py.
tuple googletest-output-test.COMMAND_LIST_TESTS = ({}, [PROGRAM_PATH, '--gtest_list_tests']) |
Definition at line 64 of file googletest-output-test.py.
tuple googletest-output-test.COMMAND_WITH_COLOR = ({}, [PROGRAM_PATH, '--gtest_color=yes']) |
Definition at line 65 of file googletest-output-test.py.
tuple googletest-output-test.COMMAND_WITH_DISABLED |
Definition at line 70 of file googletest-output-test.py.
tuple googletest-output-test.COMMAND_WITH_SHARDING |
Definition at line 75 of file googletest-output-test.py.
tuple googletest-output-test.COMMAND_WITH_TIME |
Definition at line 66 of file googletest-output-test.py.
string googletest-output-test.GENGOLDEN_FLAG = '--gengolden' |
Definition at line 49 of file googletest-output-test.py.
googletest-output-test.golden_file = open(GOLDEN_PATH, 'wb') |
Definition at line 333 of file googletest-output-test.py.
Definition at line 58 of file googletest-output-test.py.
googletest-output-test.GOLDEN_PATH = os.path.join(gtest_test_utils.GetSourceDir(), GOLDEN_NAME) |
Definition at line 81 of file googletest-output-test.py.
string googletest-output-test.IS_LINUX = 'Linux' |
Definition at line 55 of file googletest-output-test.py.
string googletest-output-test.IS_WINDOWS = 'nt' |
Definition at line 56 of file googletest-output-test.py.
tuple googletest-output-test.message |
Definition at line 337 of file googletest-output-test.py.
string googletest-output-test.NO_STACKTRACE_SUPPORT_FLAG = '--no_stacktrace_support' |
Definition at line 53 of file googletest-output-test.py.
def googletest-output-test.output = GetOutputOfAllCommands() |
Definition at line 332 of file googletest-output-test.py.
googletest-output-test.PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('googletest-output-test_') |
Definition at line 60 of file googletest-output-test.py.
Definition at line 251 of file googletest-output-test.py.
string googletest-output-test.SUPPORTS_STACK_TRACES = NO_STACKTRACE_SUPPORT_FLAG not in sys.argv |
Definition at line 254 of file googletest-output-test.py.
Definition at line 253 of file googletest-output-test.py.
Definition at line 252 of file googletest-output-test.py.
def googletest-output-test.test_list = GetShellCommandOutput(COMMAND_LIST_TESTS) |
Definition at line 250 of file googletest-output-test.py.