Skip to content

Commit

Permalink
ExitCode is part of the public API
Browse files Browse the repository at this point in the history
Hi,

Just discovered this through pytest-dev/pytest#5689, nice work!

Changing the import to no longer use the internal name, given that `ExitCode` is now public API.
  • Loading branch information
nicoddemus authored Aug 3, 2019
1 parent 4df888b commit 049c313
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytest_custom_exit_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def pytest_sessionfinish(session, exitstatus):
ok = EXIT_OK
except ImportError:
# From pytest 5 on the values are inside an enum
from _pytest.main import ExitCode
from pytest import ExitCode
no_tests_collected = ExitCode.NO_TESTS_COLLECTED
ok = ExitCode.OK

Expand Down

0 comments on commit 049c313

Please sign in to comment.