diff options
author | Ran Benita <ran@unusedvar.com> | 2020-02-10 23:43:30 +0200 |
---|---|---|
committer | Ran Benita <ran@unusedvar.com> | 2020-02-10 23:55:06 +0200 |
commit | d33da078a8a661c61d9453c282f0b86cc1455d05 (patch) | |
tree | d6b510e74db717affc19ba7d39da5c8c71212eb4 /testing/test_terminal.py | |
parent | 1ebca3768929c80eab8d175ba9d942c1ff648293 (diff) | |
download | pytest-d33da078a8a661c61d9453c282f0b86cc1455d05.tar.gz |
Move ExitCode's definition from _pytest.main to _pytest.config
ExitCode is used in several internal modules and hooks and so with type
annotations added, needs to be imported a lot.
_pytest.main, being the entry point, generally sits at the top of the
import tree.
So, it's not great to have ExitCode defined in _pytest.main, because it
will cause a lot of import cycles once type annotations are added (in
fact there is already one, which this change removes).
Move it to _pytest.config instead.
_pytest.main still imports ExitCode, so importing from there still
works, although external users should really be importing from `pytest`.
Diffstat (limited to 'testing/test_terminal.py')
-rw-r--r-- | testing/test_terminal.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testing/test_terminal.py b/testing/test_terminal.py index 4733469ae..53ae6d9d6 100644 --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -12,7 +12,7 @@ import pluggy import py import pytest -from _pytest.main import ExitCode +from _pytest.config import ExitCode from _pytest.pytester import Testdir from _pytest.reports import BaseReport from _pytest.terminal import _folded_skips |