MCPcopy Index your code
hub / github.com/RustPython/RustPython / setUp

Method setUp

Lib/test/test_monitoring.py:131–140  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

129class MonitoringTestBase:
130
131 def setUp(self):
132 # Check that a previous test hasn't left monitoring on.
133 for tool in range(6):
134 self.assertEqual(sys.monitoring.get_events(tool), 0)
135 self.assertIs(sys.monitoring.get_tool(TEST_TOOL), None)
136 self.assertIs(sys.monitoring.get_tool(TEST_TOOL2), None)
137 self.assertIs(sys.monitoring.get_tool(TEST_TOOL3), None)
138 sys.monitoring.use_tool_id(TEST_TOOL, "test " + self.__class__.__name__)
139 sys.monitoring.use_tool_id(TEST_TOOL2, "test2 " + self.__class__.__name__)
140 sys.monitoring.use_tool_id(TEST_TOOL3, "test3 " + self.__class__.__name__)
141
142 def tearDown(self):
143 # Check that test hasn't left monitoring on.

Callers 1

setUpMethod · 0.45

Calls 3

assertEqualMethod · 0.45
get_eventsMethod · 0.45
assertIsMethod · 0.45

Tested by

no test coverage detected