summaryrefslogtreecommitdiff
path: root/tests/test_mypy.py
diff options
context:
space:
mode:
authorElvis Pranskevichus <elvis@edgedb.com>2021-08-07 10:46:53 -0700
committerGitHub <noreply@github.com>2021-08-07 10:46:53 -0700
commitf671cb4dbb84e5e575757bdf9c053ee797863eae (patch)
tree5decfc7bd1c6dcd999225c522abbdd2fd4798855 /tests/test_mypy.py
parent189b959d2e5f09660508482398414e2869c074ff (diff)
downloadimmutables-f671cb4dbb84e5e575757bdf9c053ee797863eae.tar.gz
immutables-f671cb4dbb84e5e575757bdf9c053ee797863eae.zip
Use cibuildwheel to build wheels (#70)
The cibuildwheel infra seems to be mature enough, so use it for the wheel-building step instead of the homegrown setup. This gives us 32-bit and ARM wheels for free. Fixes: #44 Fixes: #63
Diffstat (limited to 'tests/test_mypy.py')
-rw-r--r--tests/test_mypy.py45
1 files changed, 24 insertions, 21 deletions
diff --git a/tests/test_mypy.py b/tests/test_mypy.py
index 48c7f7f..fcdc11c 100644
--- a/tests/test_mypy.py
+++ b/tests/test_mypy.py
@@ -1,23 +1,26 @@
import os
-import mypy.test.testcmdline
-from mypy.test.helpers import normalize_error_messages
-
-# I'm upset. There's no other way to deal with the little 'defined here'
-# notes that mypy emits when passing an unexpected keyword argument
-# and at no other time.
-def renormalize_error_messages(messages):
- messages = [x for x in messages if not x.endswith(' defined here')]
- return normalize_error_messages(messages)
-
-
-mypy.test.testcmdline.normalize_error_messages = renormalize_error_messages
-
-
-this_file_dir = os.path.dirname(os.path.realpath(__file__))
-test_data_prefix = os.path.join(this_file_dir, 'test-data')
-
-
-class ImmuMypyTest(mypy.test.testcmdline.PythonCmdlineSuite):
- data_prefix = test_data_prefix
- files = ['check-immu.test']
+try:
+ import mypy.test.testcmdline
+ from mypy.test.helpers import normalize_error_messages
+except (ImportError, AssertionError):
+ if os.environ.get('IMMU_SKIP_MYPY_TESTS'):
+ pass
+ else:
+ raise
+else:
+ # I'm upset. There's no other way to deal with the little 'defined here'
+ # notes that mypy emits when passing an unexpected keyword argument
+ # and at no other time.
+ def renormalize_error_messages(messages):
+ messages = [x for x in messages if not x.endswith(' defined here')]
+ return normalize_error_messages(messages)
+
+ mypy.test.testcmdline.normalize_error_messages = renormalize_error_messages
+
+ this_file_dir = os.path.dirname(os.path.realpath(__file__))
+ test_data_prefix = os.path.join(this_file_dir, 'test-data')
+
+ class ImmuMypyTest(mypy.test.testcmdline.PythonCmdlineSuite):
+ data_prefix = test_data_prefix
+ files = ['check-immu.test']