(self)
| 190 | self.assertRegex(res.out.decode('utf-8'), expected) |
| 191 | |
| 192 | def test_run_module(self): |
| 193 | # Test expected operation of the '-m' switch |
| 194 | # Switch needs an argument |
| 195 | assert_python_failure('-m') |
| 196 | # Check we get an error for a nonexistent module |
| 197 | assert_python_failure('-m', 'fnord43520xyz') |
| 198 | # Check the runpy module also gives an error for |
| 199 | # a nonexistent module |
| 200 | assert_python_failure('-m', 'runpy', 'fnord43520xyz') |
| 201 | # All good if module is located and run successfully |
| 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 |
nothing calls this directly
no test coverage detected