From: Menno Smits Date: Wed, 10 Dec 2014 12:18:55 +0000 (+1300) Subject: Include unittest2 in "tests_require" when running on Python 2.6 or earlier X-Git-Tag: 0.12^2~7^2~3 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=196fc0057733800ceab0286f6b141f4cef35c14d;p=imapclient.git Include unittest2 in "tests_require" when running on Python 2.6 or earlier ...removing the need to add the dependency in tox.ini. --- diff --git a/setup.py b/setup.py index 68d1c9c..1b66033 100644 --- a/setup.py +++ b/setup.py @@ -52,6 +52,9 @@ class TestDiscoverCommand(TestCommand): module = None unittest.main(argv=['', 'discover'], module=module) +test_deps = ['mock==0.8.0'] +if IS_OLD_PYTHON: + test_deps.append('unittest2') setup(name='IMAPClient', version=version, @@ -62,7 +65,7 @@ setup(name='IMAPClient', download_url='http://freshfoo.com/projects/IMAPClient/IMAPClient-%s.zip' % version, packages=find_packages(), package_data=dict(imapclient=['examples/*.py']), - tests_require=['mock==0.8.0'], + tests_require=test_deps, description="Easy-to-use, Pythonic and complete IMAP client library", long_description=desc, classifiers=[ diff --git a/tox.ini b/tox.ini index 4c82c0d..f0130e8 100644 --- a/tox.ini +++ b/tox.ini @@ -3,6 +3,3 @@ envlist=py26,py27,py32,py33 [testenv] commands=python setup.py test - -[testenv:py26] -deps=unittest2