MCPcopy Create free account
hub / github.com/apple/foundationdb / run_test

Method run_test

tests/python_tests/python_correctness.py:137–156  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

135
136 # Python correctness tests (checks if functions run and yield correct results)
137 def run_test(self):
138 try:
139 db = fdb.open(None, "DB")
140 except KeyboardInterrupt:
141 raise
142 except Exception:
143 self.result.add_error(self.get_error("fdb.open failed"))
144 return
145
146 try:
147 print("Testing functions...")
148 self.test_functions(db)
149
150 print("Testing correctness...")
151 del db[:]
152 self.test_correctness(db)
153 except KeyboardInterrupt:
154 raise
155 except Exception:
156 self.result.add_error(self.get_error("Failed to complete all tests"))
157
158 # Generates a random set of keys and values
159 def generate_data(

Callers

nothing calls this directly

Calls 6

get_errorMethod · 0.95
test_functionsMethod · 0.95
test_correctnessMethod · 0.95
add_errorMethod · 0.80
openMethod · 0.65
printFunction · 0.50

Tested by

no test coverage detected