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

Method setUp

test/test_collation.py:101–108  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

99
100 @client_context.require_connection
101 def setUp(self) -> None:
102 super().setUp()
103 self.listener = OvertCommandListener()
104 self.client = self.rs_or_single_client(event_listeners=[self.listener])
105 self.db = self.client.pymongo_test
106 self.collation = Collation("en_US")
107 self.warn_context = warnings.catch_warnings()
108 self.warn_context.__enter__()
109
110 def tearDown(self) -> None:
111 self.warn_context.__exit__()

Callers

nothing calls this directly

Calls 4

CollationClass · 0.90
rs_or_single_clientMethod · 0.80
__enter__Method · 0.45

Tested by

no test coverage detected