tesseract v5.3.3.20231005
googletest-env-var-test.GTestEnvVarTest Class Reference
Inheritance diagram for googletest-env-var-test.GTestEnvVarTest:

Public Member Functions

def testEnvVarAffectsFlag (self)
 
def testXmlOutputFile (self)
 
def testXmlOutputFileOverride (self)
 

Detailed Description

Definition at line 81 of file googletest-env-var-test.py.

Member Function Documentation

◆ testEnvVarAffectsFlag()

def googletest-env-var-test.GTestEnvVarTest.testEnvVarAffectsFlag (   self)
Tests that environment variable should affect the corresponding flag.

Definition at line 83 of file googletest-env-var-test.py.

83 def testEnvVarAffectsFlag(self):
84 """Tests that environment variable should affect the corresponding flag."""
85
86 TestFlag('break_on_failure', '1', '0')
87 TestFlag('color', 'yes', 'auto')
88 SetEnvVar('TESTBRIDGE_TEST_RUNNER_FAIL_FAST', None) # For 'fail_fast' test
89 TestFlag('fail_fast', '1', '0')
90 TestFlag('filter', 'FooTest.Bar', '*')
91 SetEnvVar('XML_OUTPUT_FILE', None) # For 'output' test
92 TestFlag('output', 'xml:tmp/foo.xml', '')
93 TestFlag('brief', '1', '0')
94 TestFlag('print_time', '0', '1')
95 TestFlag('repeat', '999', '1')
96 TestFlag('throw_on_failure', '1', '0')
97 TestFlag('death_test_style', 'threadsafe', 'fast')
98 TestFlag('catch_exceptions', '0', '1')
99
100 if IS_LINUX:
101 TestFlag('death_test_use_fork', '1', '0')
102 TestFlag('stack_trace_depth', '0', '100')
103
104
def TestFlag(flag, test_val, default_val)

◆ testXmlOutputFile()

def googletest-env-var-test.GTestEnvVarTest.testXmlOutputFile (   self)
Tests that $XML_OUTPUT_FILE affects the output flag.

Definition at line 105 of file googletest-env-var-test.py.

105 def testXmlOutputFile(self):
106 """Tests that $XML_OUTPUT_FILE affects the output flag."""
107
108 SetEnvVar('GTEST_OUTPUT', None)
109 SetEnvVar('XML_OUTPUT_FILE', 'tmp/bar.xml')
110 AssertEq('xml:tmp/bar.xml', GetFlag('output'))
111
def AssertEq(expected, actual)

◆ testXmlOutputFileOverride()

def googletest-env-var-test.GTestEnvVarTest.testXmlOutputFileOverride (   self)
Tests that $XML_OUTPUT_FILE is overridden by $GTEST_OUTPUT.

Definition at line 112 of file googletest-env-var-test.py.

112 def testXmlOutputFileOverride(self):
113 """Tests that $XML_OUTPUT_FILE is overridden by $GTEST_OUTPUT."""
114
115 SetEnvVar('GTEST_OUTPUT', 'xml:tmp/foo.xml')
116 SetEnvVar('XML_OUTPUT_FILE', 'tmp/bar.xml')
117 AssertEq('xml:tmp/foo.xml', GetFlag('output'))
118

The documentation for this class was generated from the following file: