Skip to content

Commit

Permalink
Fix an import error
Browse files Browse the repository at this point in the history
  • Loading branch information
tonybaloney committed Nov 25, 2023
1 parent 3bb53dd commit 975c2ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pytest_subinterpreter/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def pytest_addoption(parser):
def wrap_pytest():
# args: tuple[str], plugins: tuple[str]
import sys
from pytest_subinterpreter.faulthandler import FaultHandler

from _pytest.main import wrap_session, _main
from _pytest.config import get_config
Expand All @@ -23,6 +22,8 @@ def wrap_pytest():
config.parse(list(args))

# The CPython faulthandler isn't supported, patch it with a dummy.
# Pytest requires that you import the module after importing pytest things.
from pytest_subinterpreter.faulthandler import FaultHandler
sys.modules["faulthandler"] = FaultHandler()

wrap_session(config, _main)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name="pytest-subinterpreter",
version="0.0.1",
version="0.0.2",
description="Run pytest in a subinterpreter",
long_description=long_description,
packages=["pytest_subinterpreter"],
Expand Down

0 comments on commit 975c2ef

Please sign in to comment.