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

Method test_run_module_bug1764407

Lib/test/test_cmd_line.py:176–185  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

174 assert_python_ok('-m', 'timeit', '-n', '1')
175
176 def test_run_module_bug1764407(self):
177 # -m and -i need to play well together
178 # Runs the timeit module and checks the __main__
179 # namespace has been populated appropriately
180 p = spawn_python('-i', '-m', 'timeit', '-n', '1')
181 p.stdin.write(b'Timer\n')
182 p.stdin.write(b'exit()\n')
183 data = kill_python(p)
184 self.assertTrue(data.find(b'1 loop') != -1)
185 self.assertTrue(data.find(b'__main__.Timer') != -1)
186
187 def test_relativedir_bug46421(self):
188 # Test `python -m unittest` with a relative directory beginning with ./

Callers

nothing calls this directly

Calls 5

spawn_pythonFunction · 0.90
kill_pythonFunction · 0.90
assertTrueMethod · 0.80
writeMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected