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

Function teardown

test/__init__.py:1218–1227  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1216
1217
1218def teardown():
1219 global_knobs.disable()
1220 garbage = []
1221 for g in gc.garbage:
1222 garbage.append(f"GARBAGE: {g!r}")
1223 garbage.append(f" gc.get_referents: {gc.get_referents(g)!r}")
1224 garbage.append(f" gc.get_referrers: {gc.get_referrers(g)!r}")
1225 if garbage:
1226 raise AssertionError("\n".join(garbage))
1227 print_running_clients()
1228
1229
1230@contextmanager

Callers 1

test_setup_and_teardownFunction · 0.90

Calls 3

print_running_clientsFunction · 0.70
disableMethod · 0.45
joinMethod · 0.45

Tested by 1

test_setup_and_teardownFunction · 0.72