Skip to content

Commit

Permalink
Support for running tests on Python 2.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitar committed Dec 29, 2013
1 parent fec3674 commit 8849a95
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Expand Up @@ -16,10 +16,8 @@ before_install:
install:
- pip install pep8 --use-mirrors
- pip install https://github.com/lamby/django-lint/archive/master.zip pylint --use-mirrors
- pip uninstall --yes unittest2
- pip install -r requirements.txt --use-mirrors
before_script:
- find / -name postgis.sql || true
- curl https://raw.github.com/django/django/1.5.1/docs/ref/contrib/gis/install/create_template_postgis-debian.sh | sh
- createdb -T template_postgis nodewatcher
- pep8 nodewatcher
Expand Down
8 changes: 5 additions & 3 deletions nodewatcher/test_runner.py
@@ -1,6 +1,8 @@
import unittest

from django.conf import settings
from django.test import simple, testcases
from django.utils import unittest
from django.utils import unittest as django_unittest


class FilteredTestSuiteRunner(simple.DjangoTestSuiteRunner):
Expand All @@ -16,10 +18,10 @@ def _filter_suite(self, suite):
# We do NOT filter if filters are not set
return suite

filtered = unittest.TestSuite()
filtered = django_unittest.TestSuite()

for test in suite:
if isinstance(test, unittest.TestSuite):
if isinstance(test, (unittest.TestSuite, django_unittest.TestSuite)):
filtered.addTests(self._filter_suite(test))
else:
for f in filters:
Expand Down

0 comments on commit 8849a95

Please sign in to comment.