summaryrefslogtreecommitdiff
path: root/tests/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/conftest.py')
-rw-r--r--tests/conftest.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
new file mode 100644
index 0000000..9eb9e61
--- /dev/null
+++ b/tests/conftest.py
@@ -0,0 +1,13 @@
+# We need the mypy pytest plugin to do the test collection for our
+# typing tests.
+
+# mypy demands that its test-data be present for mypy.test.config to be
+# imported, so thwart that check. mypy PR #10919 fixes this.
+import unittest.mock
+with unittest.mock.patch('os.path.isdir') as isdir:
+ isdir.return_value = True
+ import mypy.test.config # noqa
+
+pytest_plugins = [
+ 'mypy.test.data',
+]