Skip to content

Commit

Permalink
- removed plug-in preloading, which doesn't seem effective
Browse files Browse the repository at this point in the history
  in speeding up execution;
  • Loading branch information
jaltmayerpizzorno committed Apr 9, 2024
1 parent e3f79ec commit cb3d940
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/slipcover/isolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,7 @@ def get_exit_code(self):
return pytest.ExitCode.TESTS_FAILED if self._test_failed else pytest.ExitCode.OK


def preload_pytest_plugins():
"""Preloads pytest plugins, in an attempt to speed things up."""
import pkg_resources
import importlib
import warnings

for ep in pkg_resources.iter_entry_points(group='pytest11'):
try:
importlib.import_module(ep.module_name)
except ImportError as e:
warnings.warn(e)


if __name__ == "__main__":
preload_pytest_plugins()

plugin = IsolatePlugin()
exitcode = pytest.main(sys.argv[1:] + ['--forked'], plugins=[plugin])
if exitcode in (pytest.ExitCode.OK, pytest.ExitCode.NO_TESTS_COLLECTED):
Expand Down

0 comments on commit cb3d940

Please sign in to comment.