summaryrefslogtreecommitdiffstats
path: root/python/runtests.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/runtests.py')
-rw-r--r--python/runtests.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/python/runtests.py b/python/runtests.py
new file mode 100644
index 0000000..bcf650b
--- /dev/null
+++ b/python/runtests.py
@@ -0,0 +1,14 @@
+import pytest
+import sys
+import os
+
+try:
+ import _clippy
+except ImportError:
+ sys.stderr.write('''these tests need to be run with the _clippy C extension
+module available. Try running "clippy runtests.py ...".
+''')
+ sys.exit(1)
+
+os.chdir(os.path.dirname(os.path.abspath(__file__)))
+raise SystemExit(pytest.main(sys.argv[1:]))