Skip to content

Commit

Permalink
Fix tests on Python 2.6
Browse files Browse the repository at this point in the history
Fixes #14 and #15.
  • Loading branch information
hynek committed Jul 3, 2015
1 parent abb9c95 commit 0149b53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down
6 changes: 4 additions & 2 deletions tests/test_dunders.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down

0 comments on commit 0149b53

Please sign in to comment.