Skip to content

Commit a3fb997

Browse files
committed
Add mock as a dependency under Python < 3.0, fixes #30
1 parent c02a219 commit a3fb997

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

setup.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ def run_tests(self):
2626
except:
2727
long_description = None
2828

29+
test_requires = [
30+
'pytest >= 2.5.2',
31+
'pytest-cov >= 1.6',
32+
]
33+
34+
if sys.version_info[:2] < (3, 0):
35+
test_requires.append('mock')
36+
2937
setup(
3038
name='serfclient',
3139
version='1.0.0',
@@ -40,7 +48,6 @@ def run_tests(self):
4048
license='MIT',
4149
packages=['serfclient'],
4250
install_requires=['msgpack-python >= 0.4.0'],
43-
tests_require=['pytest >= 2.5.2',
44-
'pytest-cov >= 1.6'],
45-
cmdclass={'test': PyTest}
51+
tests_require=test_requires,
52+
cmdclass={'test': PyTest},
4653
)

0 commit comments

Comments
 (0)