tesseract v5.3.3.20231005
googletest-json-outfiles-test.GTestJsonOutFilesTest Class Reference
Inheritance diagram for googletest-json-outfiles-test.GTestJsonOutFilesTest:

Public Member Functions

def setUp (self)
 
def tearDown (self)
 
def DeleteFilesAndDir (self)
 
def testOutfile1 (self)
 
def testOutfile2 (self)
 

Public Attributes

 output_dir_
 

Detailed Description

Unit test for Google Test's JSON output functionality.

Definition at line 131 of file googletest-json-outfiles-test.py.

Member Function Documentation

◆ DeleteFilesAndDir()

def googletest-json-outfiles-test.GTestJsonOutFilesTest.DeleteFilesAndDir (   self)

Definition at line 145 of file googletest-json-outfiles-test.py.

145 def DeleteFilesAndDir(self):
146 try:
147 os.remove(os.path.join(self.output_dir_, GTEST_OUTPUT_1_TEST + '.json'))
148 except os.error:
149 pass
150 try:
151 os.remove(os.path.join(self.output_dir_, GTEST_OUTPUT_2_TEST + '.json'))
152 except os.error:
153 pass
154 try:
155 os.rmdir(self.output_dir_)
156 except os.error:
157 pass
158

◆ setUp()

def googletest-json-outfiles-test.GTestJsonOutFilesTest.setUp (   self)

Definition at line 134 of file googletest-json-outfiles-test.py.

134 def setUp(self):
135 # We want the trailing '/' that the last "" provides in os.path.join, for
136 # telling Google Test to create an output directory instead of a single file
137 # for xml output.
138 self.output_dir_ = os.path.join(gtest_test_utils.GetTempDir(),
139 GTEST_OUTPUT_SUBDIR, '')
140 self.DeleteFilesAndDir()
141

◆ tearDown()

def googletest-json-outfiles-test.GTestJsonOutFilesTest.tearDown (   self)

Definition at line 142 of file googletest-json-outfiles-test.py.

142 def tearDown(self):
143 self.DeleteFilesAndDir()
144

◆ testOutfile1()

def googletest-json-outfiles-test.GTestJsonOutFilesTest.testOutfile1 (   self)

Definition at line 159 of file googletest-json-outfiles-test.py.

159 def testOutfile1(self):
160 self._TestOutFile(GTEST_OUTPUT_1_TEST, EXPECTED_1)
161

◆ testOutfile2()

def googletest-json-outfiles-test.GTestJsonOutFilesTest.testOutfile2 (   self)

Definition at line 162 of file googletest-json-outfiles-test.py.

162 def testOutfile2(self):
163 self._TestOutFile(GTEST_OUTPUT_2_TEST, EXPECTED_2)
164

Member Data Documentation

◆ output_dir_

googletest-json-outfiles-test.GTestJsonOutFilesTest.output_dir_

Definition at line 138 of file googletest-json-outfiles-test.py.


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