Skip to content

Commit

Permalink
Try to support skiptest on py2.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Apr 8, 2013
1 parent d09539a commit 0b691cd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@
install_requires = [
"six",
]
tests_require = [
'nose',
]

if sys.version_info[0] ==2 and sys.version_info[1] < 7:
if sys.version_info[0] == 2 and sys.version_info[1] < 7:
install_requires.extend([
'ordereddict',
])
tests_require.extend([
'unittest2',
])

setup(name='taskw',
version=version,
Expand All @@ -44,7 +50,7 @@
zip_safe=False,
install_requires=install_requires,
test_suite='nose.collector',
tests_require=['nose'],
tests_require=tests_require,
entry_points="""
# -*- Entry points: -*-
""",
Expand Down
6 changes: 6 additions & 0 deletions taskw/test/test_datas.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

from taskw import TaskWarrior, TaskWarriorExperimental

# Python 2.6 can't handle fancy unit test stuff.
if sys.version_info[0] == 2 and sys.version_info[1] < 7:
import unittest2 as unittest
else:
import unittest

TASK = {'description': "task 2 http://www.google.com/",
'entry': "1325011643",
'project': "work",
Expand Down

0 comments on commit 0b691cd

Please sign in to comment.