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

Method test_explain_with_read_concern

test/test_cursor.py:363–371  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

361 self.assertIn("executionStats", b)
362
363 def test_explain_with_read_concern(self):
364 # Do not add readConcern level to explain.
365 listener = AllowListEventListener("explain")
366 client = self.rs_or_single_client(event_listeners=[listener])
367 coll = client.pymongo_test.test.with_options(read_concern=ReadConcern(level="local"))
368 self.assertTrue(coll.find().explain())
369 started = listener.started_events
370 self.assertEqual(len(started), 1)
371 self.assertNotIn("readConcern", started[0].command)
372
373 # https://github.com/mongodb/specifications/blob/master/source/crud/tests/README.md#14-explain-helpers-allow-users-to-specify-maxtimems
374 def test_explain_csot(self):

Callers

nothing calls this directly

Calls 6

ReadConcernClass · 0.90
rs_or_single_clientMethod · 0.80
with_optionsMethod · 0.45
explainMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected