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

Method test_run_module

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

Source from the content-addressed store, hash-verified

162 self.assertRegex(res.out.decode('utf-8'), expected)
163
164 def test_run_module(self):
165 # Test expected operation of the '-m' switch
166 # Switch needs an argument
167 assert_python_failure('-m')
168 # Check we get an error for a nonexistent module
169 assert_python_failure('-m', 'fnord43520xyz')
170 # Check the runpy module also gives an error for
171 # a nonexistent module
172 assert_python_failure('-m', 'runpy', 'fnord43520xyz')
173 # All good if module is located and run successfully
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

Callers

nothing calls this directly

Calls 2

assert_python_failureFunction · 0.90
assert_python_okFunction · 0.90

Tested by

no test coverage detected