Fix tests on Python 2.6

Fixes #14 and #15.
This commit is contained in:
Hynek Schlawack 2015-07-03 11:30:53 +02:00
parent abb9c95232
commit 0149b538ab
2 changed files with 5 additions and 3 deletions

View File

@ -98,7 +98,7 @@ if __name__ == "__main__":
install_requires=[
],
tests_require=[
"pytest",
"pytest>=2.7.2", # see https://github.com/hynek/attrs/issues/14
"zope.interface",
],
cmdclass={

View File

@ -206,8 +206,10 @@ class TestAddInit(object):
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):
"""