diff --git a/setup.py b/setup.py index 3ca0daeb..bd018e1f 100644 --- a/setup.py +++ b/setup.py @@ -45,7 +45,11 @@ with open(fname) as f: tests_require = [l.strip() for l in f.readlines()] if sys.version_info[:2] < (3, 3): - tests_require.append('mock') + # recent versions of mock doesn't support Python 2.6 + if sys.version_info[:2] == (2, 6): + tests_require.append('mock==1.0.1') + else: + tests_require.append('mock') if sys.version_info[:2] < (2, 7): tests_require.append('unittest2') diff --git a/tox.ini b/tox.ini index 380d8ac1..428b5b4e 100644 --- a/tox.ini +++ b/tox.ini @@ -7,6 +7,6 @@ usedevelop = True commands = py.test {posargs:tests/} deps = -rrequirements_test.txt - py26: unittest2 - py2{6,7},pypy,py32,pypy3: mock + py26: unittest2, mock==1.0.1 + py27,pypy,py32,pypy3: mock py3{3,4}: aiohttp