Skip to content

Commit e477ccc

Browse files
committed
skip pypy tests on mypy
see python/typed_ast#111
1 parent 99e1dad commit e477ccc

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
':python_version == "3.6"': ["dataclasses"],
1919
"lint": ["pre-commit~=1.18"],
2020
"docs": ["sphinx"],
21-
"tests": ["mypy"],
21+
"tests": ["mypy; implementation_name != 'pypy'"],
2222
}
2323
EXTRAS_REQUIRE["dev"] = (
2424
EXTRAS_REQUIRE["enum"]

tests/test_mypy.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
import os
44
import unittest
55

6-
import mypy.api
6+
mypy_installed = True
7+
try:
8+
import mypy.api
9+
except ImportError:
10+
# mypy not installed on pypy (see setup.py)
11+
mypy_installed = False
712

813
HERE = os.path.dirname(__file__)
914
TEST_OUTPUT_DIR = os.path.join(HERE, "test-output")
@@ -14,6 +19,7 @@
1419
"""
1520

1621

22+
@unittest.skipUnless(mypy_installed, "mypy required")
1723
class TestMypyPlugin(unittest.TestCase):
1824
maxDiff = None
1925

0 commit comments

Comments
 (0)