(self)
| 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 |
nothing calls this directly
no test coverage detected