def test_ignores_modules_with_inspection_errors(self): project = EmptyProject() project.create_module("ugly.py", errors=[Exception()]) tg = TestGenerator() tg.add_tests_to_project(project, ["ugly.py"]) assert_doesnt_contain(self._get_log_output(), "Generating tests for module ugly.py.")
def test_logs_warning_about_uninspected_modules(self): tg = TestGenerator() tg.add_tests_to_project(self.ProjectWithoutModules(), ["me_here_neither.py"]) assert_contains_once(self._get_log_output(), "WARNING: Failed to inspect module me_here_neither.py, skipping test generation.")
def test_ignores_uninspected_modules(self): tg = TestGenerator() assert_not_raises(ModuleNotFound, lambda: tg.add_tests_to_project(self.ProjectWithoutModules(), ["im_not_here.py"]))