MCPcopy Index your code
hub / github.com/python/cpython / test_run_module_bug1764407

Method test_run_module_bug1764407

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

Source from the content-addressed store, hash-verified

202 assert_python_ok('-m', 'timeit', '-n', '1')
203
204 def test_run_module_bug1764407(self):
205 # -m and -i need to play well together
206 # Runs the timeit module and checks the __main__
207 # namespace has been populated appropriately
208 p = spawn_python('-i', '-m', 'timeit', '-n', '1')
209 p.stdin.write(b'Timer\n')
210 p.stdin.write(b'exit()\n')
211 data = kill_python(p)
212 self.assertTrue(data.find(b'1 loop') != -1)
213 self.assertTrue(data.find(b'__main__.Timer') != -1)
214
215 @support.cpython_only
216 def test_null_byte_in_interactive_mode(self):

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