mirror of
https://github.com/kennethreitz/pydantic.git
synced 2026-06-05 23:00:18 +00:00
skip mypy tests on py3.11, switch pytest-sugar -> pytest-pretty (#4738)
* skip mypy tests on py3.11 * improve comment * switch pytest-sugar -> pytest-pretty, other uprevs
This commit is contained in:
@@ -2,4 +2,4 @@ coverage[toml]
|
||||
dirty-equals
|
||||
pytest
|
||||
pytest-mock
|
||||
pytest-sugar
|
||||
pytest-pretty
|
||||
|
||||
@@ -6,40 +6,49 @@
|
||||
#
|
||||
attrs==22.1.0
|
||||
# via pytest
|
||||
commonmark==0.9.1
|
||||
# via rich
|
||||
coverage[toml]==6.4.4
|
||||
# via -r requirements/testing.in
|
||||
dirty-equals==0.5.0
|
||||
# via -r requirements/testing.in
|
||||
importlib-metadata==5.0.0
|
||||
# via
|
||||
# pluggy
|
||||
# pytest
|
||||
iniconfig==1.1.1
|
||||
# via pytest
|
||||
packaging==21.3
|
||||
# via
|
||||
# pytest
|
||||
# pytest-sugar
|
||||
# via pytest
|
||||
pluggy==1.0.0
|
||||
# via pytest
|
||||
py==1.11.0
|
||||
# via pytest
|
||||
pygments==2.13.0
|
||||
# via rich
|
||||
pyparsing==3.0.9
|
||||
# via packaging
|
||||
pytest==7.1.3
|
||||
# via
|
||||
# -r requirements/testing.in
|
||||
# pytest-mock
|
||||
# pytest-sugar
|
||||
# pytest-pretty
|
||||
pytest-mock==3.8.2
|
||||
# via -r requirements/testing.in
|
||||
pytest-sugar==0.9.5
|
||||
pytest-pretty==0.0.1
|
||||
# via -r requirements/testing.in
|
||||
pytz==2022.4
|
||||
# via dirty-equals
|
||||
termcolor==1.1.0
|
||||
# via pytest-sugar
|
||||
rich==12.6.0
|
||||
# via pytest-pretty
|
||||
tomli==2.0.1
|
||||
# via
|
||||
# coverage
|
||||
# pytest
|
||||
typing-extensions==4.3.0
|
||||
# via dirty-equals
|
||||
# via
|
||||
# dirty-equals
|
||||
# importlib-metadata
|
||||
# rich
|
||||
zipp==3.8.1
|
||||
# via importlib-metadata
|
||||
|
||||
+11
-1
@@ -17,7 +17,17 @@ except ImportError:
|
||||
parse_mypy_version = lambda _: (0,) # noqa: E731
|
||||
|
||||
|
||||
pytestmark = pytest.mark.skipif(sys.platform != 'linux' and 'CI' in os.environ, reason='only run on linux when on CI')
|
||||
def should_skip():
|
||||
if sys.version_info >= (3, 11):
|
||||
# mypy doesn't fully support 3.11 and tests are taking minutes, see #4738
|
||||
# mypy v0.990 is even worse, see #4735
|
||||
# TODO remove once 3.11 is fully supported by mypy
|
||||
return True
|
||||
else:
|
||||
return sys.platform != 'linux' and 'CI' in os.environ
|
||||
|
||||
|
||||
pytestmark = pytest.mark.skipif(should_skip(), reason='Skip on 3.11, only run on linux when on CI')
|
||||
|
||||
# This ensures mypy can find the test files, no matter where tests are run from:
|
||||
os.chdir(Path(__file__).parent.parent.parent)
|
||||
|
||||
Reference in New Issue
Block a user