MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / create_tests

Function create_tests

test/test_sdam_monitoring_spec.py:256–265  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

254
255
256def create_tests():
257 for dirpath, _, filenames in os.walk(TEST_PATH):
258 for filename in filenames:
259 with open(os.path.join(dirpath, filename)) as scenario_stream:
260 scenario_def = json.load(scenario_stream, object_hook=object_hook)
261 # Construct test from scenario.
262 new_test = create_test(scenario_def)
263 test_name = f"test_{os.path.splitext(filename)[0]}"
264 new_test.__name__ = test_name
265 setattr(TestAllScenarios, new_test.__name__, new_test)
266
267
268create_tests()

Callers 1

Calls 2

create_testFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected