forked from pycontribs/confluence
- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
Latest commit
38 lines (29 loc) · 983 Bytes
/
Copy pathsetup.py
File metadata and controls
38 lines (29 loc) · 983 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env python
importsetuptools
fromsetuptools.command.testimporttestasTestCommand
importsys
# In python < 2.7.4, a lazy loading of package `pbr` will break
# setuptools if some other modules registered functions in `atexit`.
# solution from: http://bugs.python.org/issue15881#msg170215
try:
importmultiprocessing# noqa
exceptImportError:
pass
classPyTest(TestCommand):
definitialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args= []
deffinalize_options(self):
TestCommand.finalize_options(self)
self.test_args= []
self.test_suite=True
defrun_tests(self):
# import here, cause outside the eggs aren't loaded
importpytest
errno=pytest.main(self.pytest_args)
sys.exit(errno)
setuptools.setup(
setup_requires=['pbr>=1.9', 'setuptools>=17.1', 'pytest-runner'],
pbr=True,
cmdclass={'test': PyTest},
test_suite='tests')