diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-08-21 22:40:52 -0500 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-08-21 22:40:52 -0500 |
commit | 0bb274ec57e21c25fe084a59425f65ff7d8deeca (patch) | |
tree | 955c6ceab07a241bfc1cd80dab9295d0e0a4c0f8 | |
parent | 3d46ef4447b31a785d62a5f79fc710a212e0cf67 (diff) | |
download | six-0bb274ec57e21c25fe084a59425f65ff7d8deeca.tar.gz |
use py.test.raises
-rw-r--r-- | test_six.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/test_six.py b/test_six.py index 544bf74..216e7d8 100644 --- a/test_six.py +++ b/test_six.py @@ -568,9 +568,4 @@ def test_add_metaclass(): assert MySlots.__slots__ == ["a", "b"] instance = MySlots() instance.a = "foo" - try: - instance.c = "baz" - except AttributeError: - pass - else: - raise RuntimeError("did not raise") + py.test.raises(AttributeError, setattr, instance, "c", "baz") |