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

Method test_lock_object_id

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

Source from the content-addressed store, hash-verified

53 self.client.admin.command("ping")
54
55 def test_lock_object_id(self):
56 # Forks the client with ObjectId's _inc_lock locked.
57 # Parent => _inc_lock should remain locked.
58 # Child => _inc_lock should be unlocked.
59 with ObjectId._inc_lock:
60
61 def target():
62 self.assertFalse(ObjectId._inc_lock.locked())
63 self.assertTrue(ObjectId())
64
65 with self.fork(target):
66 pass
67
68 def test_topology_reset(self):
69 # Tests that topologies are different from each other.

Callers

nothing calls this directly

Calls 1

forkMethod · 0.45

Tested by

no test coverage detected