MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / run_scenario

Function run_scenario

test/asynchronous/test_server_selection_rtt.py:44–53  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

42
43def create_test(scenario_def):
44 def run_scenario(self):
45 moving_average = MovingAverage()
46
47 if scenario_def["avg_rtt_ms"] != "NULL":
48 moving_average.add_sample(scenario_def["avg_rtt_ms"])
49
50 if scenario_def["new_rtt_ms"] != "NULL":
51 moving_average.add_sample(scenario_def["new_rtt_ms"])
52
53 self.assertAlmostEqual(moving_average.get(), scenario_def["new_avg_rtt"])
54
55 return run_scenario
56

Callers

nothing calls this directly

Calls 3

add_sampleMethod · 0.95
getMethod · 0.95
MovingAverageClass · 0.90

Tested by

no test coverage detected