Use unittest2 for Python 2.6.

This commit is contained in:
Vincent Driessen 2013-01-23 22:43:30 +01:00
parent cc14d6f00b
commit 06b48c2026
2 changed files with 11 additions and 2 deletions

View File

@ -1,5 +1,9 @@
import logging
import unittest
from rq.compat import is_python_version
if is_python_version((2, 7), (3, 2)):
import unittest
else:
import unittest2 as unittest # noqa
from redis import Redis
from rq import push_connection, pop_connection

View File

@ -1,6 +1,11 @@
from unittest import TestCase
from rq.compat import is_python_version
if is_python_version((2, 7), (3, 2)):
from unittest import TestCase
else:
from unittest2 import TestCase # noqa
from rq.scripts import read_config_file
class TestScripts(TestCase):
def test_config_file(self):
settings = read_config_file("tests.dummy_settings")