From 6d2e11b7d1481a7bf3209f65ba94d1ca20f8bd39 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 May 2017 04:18:41 -0400 Subject: [PATCH] Extract method for _mark_plugins_for_rewrite --- _pytest/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/_pytest/config.py b/_pytest/config.py index c73416f0a..5abb13d5a 100644 --- a/_pytest/config.py +++ b/_pytest/config.py @@ -995,6 +995,10 @@ class Config(object): except SystemError: mode = 'plain' else: + self._mark_plugins_for_rewrite(hook) + self._warn_about_missing_assertion(mode) + + def _mark_plugins_for_rewrite(self, hook): import pkg_resources self.pluginmanager.rewrite_hook = hook for entrypoint in pkg_resources.iter_entry_points('pytest11'): @@ -1013,7 +1017,6 @@ class Config(object): elif is_package: package_name = os.path.dirname(fn) hook.mark_rewrite(package_name) - self._warn_about_missing_assertion(mode) def _warn_about_missing_assertion(self, mode): try: