We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0470893 commit 2609358Copy full SHA for 2609358
setup.py
@@ -10,6 +10,7 @@
10
import platform
11
import re
12
import sys
13
+import unittest
14
15
import setuptools
16
from setuptools.command import build_ext as _build_ext
@@ -26,6 +27,12 @@
26
27
LDFLAGS.append('ws2_32.lib')
28
29
30
+def discover_tests():
31
+ test_loader = unittest.TestLoader()
32
+ test_suite = test_loader.discover('tests', pattern='test_*.py')
33
+ return test_suite
34
+
35
36
class build_ext(_build_ext.build_ext):
37
user_options = _build_ext.build_ext.user_options + [
38
('cython-always', None,
@@ -193,4 +200,5 @@ def _patch_cfile(self, cfile):
193
200
extra_link_args=LDFLAGS)
194
201
],
195
202
cmdclass={'build_ext': build_ext},
203
+ test_suite='setup.discover_tests',
196
204
)
0 commit comments