(self)
| 4200 | ) |
| 4201 | |
| 4202 | def test_module_without_a_main(self): |
| 4203 | module_name = 't_main' |
| 4204 | os_helper.rmtree(module_name) |
| 4205 | init_file = module_name + '/__init__.py' |
| 4206 | os.mkdir(module_name) |
| 4207 | with open(init_file, 'w'): |
| 4208 | pass |
| 4209 | self.addCleanup(os_helper.rmtree, module_name) |
| 4210 | stdout, stderr = self._run_pdb( |
| 4211 | ['-m', module_name], "", expected_returncode=1 |
| 4212 | ) |
| 4213 | self.assertIn("ImportError: No module named t_main.__main__;", stdout) |
| 4214 | |
| 4215 | def test_package_without_a_main(self): |
| 4216 | pkg_name = 't_pkg' |
nothing calls this directly
no test coverage detected