diff --git a/pytest_mypy/item.py b/pytest_mypy/item.py index d57adf8..ac4d63e 100644 --- a/pytest_mypy/item.py +++ b/pytest_mypy/item.py @@ -202,16 +202,16 @@ def runtest(self): assert execution_path.exists() with utils.cd(execution_path): - # start from main.py - main_file = str(execution_path / 'main.py') - mypy_cmd_options = self.prepare_mypy_cmd_options(execution_path) - mypy_cmd_options.append(main_file) - # extension point for derived packages if (hasattr(self.config.option, 'mypy_extension_hook') and self.config.option.mypy_extension_hook is not None): self.execute_extension_hook() + # start from main.py + main_file = str(execution_path / 'main.py') + mypy_cmd_options = self.prepare_mypy_cmd_options(execution_path) + mypy_cmd_options.append(main_file) + # make files self.make_test_files_in_current_directory()