diff --git a/setup.py b/setup.py index 4520e1be59b3a0c..83be9fa90d12607 100644 --- a/setup.py +++ b/setup.py @@ -98,7 +98,7 @@ def run_tests(self): install_requires=[ ], tests_require=[ - "pytest", + "pytest>=2.7.2", # see https://github.com/hynek/attrs/issues/14 "zope.interface", ], cmdclass={ diff --git a/tests/test_dunders.py b/tests/test_dunders.py index 3ca406ce02d02d8..90f723a822b31bb 100644 --- a/tests/test_dunders.py +++ b/tests/test_dunders.py @@ -206,8 +206,10 @@ def test_init(self): with pytest.raises(TypeError) as e: C(a=1, b=2) - msg = e.value if PY26 else e.value.args[0] - assert "__init__() got an unexpected keyword argument 'a'" == msg + assert ( + "__init__() got an unexpected keyword argument 'a'" == + e.value.args[0] + ) def test_sets_attributes(self): """