diff options
author | Vincent Driessen <vincent@3rdcloud.com> | 2013-02-11 09:33:54 +0100 |
---|---|---|
committer | Vincent Driessen <vincent@3rdcloud.com> | 2013-02-11 09:33:54 +0100 |
commit | 4f2a7fcf35feb125a55b3a08a950b24e443821fe (patch) | |
tree | 4732e6549b4b02b5fea9c71c2966808e6f1a8582 | |
parent | d19c7101b8a728df44338b368232f36c1c655cfe (diff) | |
download | times-4f2a7fcf35feb125a55b3a08a950b24e443821fe.tar.gz |
Improve compatibility with Python 2.6.
-rw-r--r-- | setup.py | 1 | ||||
-rw-r--r-- | tests/test_times.py | 7 | ||||
-rw-r--r-- | tox.ini | 11 |
3 files changed, 14 insertions, 5 deletions
@@ -62,6 +62,7 @@ setup( 'Natural Language :: English', 'Programming Language :: Python', 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', diff --git a/tests/test_times.py b/tests/test_times.py index b887c3d..f308475 100644 --- a/tests/test_times.py +++ b/tests/test_times.py @@ -1,10 +1,13 @@ -from unittest import TestCase +try: + import unittest2 as unittest +except ImportError: + import unittest # noqa import times import pytz from datetime import datetime -class TestTimes(TestCase): +class TestTimes(unittest.TestCase): def setUp(self): est = pytz.timezone('EST') ams = pytz.timezone('Europe/Amsterdam') @@ -1,6 +1,11 @@ [tox] -envlist = py27, py32, pypy +envlist = py26,py27,py32,py33,pypy [testenv] -deps=nose -commands=nosetests +deps=pytest +commands=py.test + +[testenv:py26] +deps= + pytest + unittest2 |