Skip to content

Commit

Permalink
Python 2.6 support using PyPI unittet2
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlia committed Sep 14, 2014
1 parent e7dbf2b commit d7493fb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 4 additions & 2 deletions pathspec/tests/test_gitignore.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
"""
This script tests ``GitIgnorePattern``.
"""

import unittest
try:
import unittest2 as unittest # for Python 2.6
except ImportError:
import unittest

from pathspec import GitIgnorePattern

Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding: utf-8

import io
import sys
from setuptools import setup, find_packages

from pathspec import __author__, __email__, __license__, __project__, __version__
Expand Down Expand Up @@ -34,4 +35,5 @@
license=__license__,
packages=find_packages(),
test_suite='pathspec.tests.test_gitignore.GitIgnoreTest',
tests_require=['unittest2'] if sys.version_info < (2, 7) else [],
)
6 changes: 5 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
[tox]
envlist = py27, py33, py34, pypy
envlist = py26, py27, py33, py34, pypy

[testenv:py26]
deps = unittest2
commands = python setup.py test

[testenv]
commands = python setup.py test

0 comments on commit d7493fb

Please sign in to comment.