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

Method test_lock_client

test/test_fork.py:40–53  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

38)
39class TestFork(IntegrationTest):
40 def test_lock_client(self):
41 # Forks the client with some items locked.
42 # Parent => All locks should be as before the fork.
43 # Child => All locks should be reset.
44 with self.client._lock:
45
46 def target():
47 with warnings.catch_warnings():
48 warnings.simplefilter("ignore")
49 self.client.admin.command("ping")
50
51 with self.fork(target):
52 pass
53 self.client.admin.command("ping")
54
55 def test_lock_object_id(self):
56 # Forks the client with ObjectId's _inc_lock locked.

Callers

nothing calls this directly

Calls 2

forkMethod · 0.45
commandMethod · 0.45

Tested by

no test coverage detected