summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_descr.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-08-10 19:42:38 (GMT)
committerGuido van Rossum <guido@python.org>2001-08-10 19:42:38 (GMT)
commit6d94627f1ecd5d9142382daa4da612ed12daf82f (patch)
tree5ee3962ea6c5e0edb8bc03e9ae4a8bbcf600c545 /Lib/test/test_descr.py
parentc4416d5a2ca4aa4eb2eac90b207118cb267d0fe1 (diff)
downloadcpython-6d94627f1ecd5d9142382daa4da612ed12daf82f.zip
cpython-6d94627f1ecd5d9142382daa4da612ed12daf82f.tar.gz
cpython-6d94627f1ecd5d9142382daa4da612ed12daf82f.tar.bz2
Allow AttributeError as well as TypeError for attribute-less objects.
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r--Lib/test/test_descr.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 92f79d5..9f731cd 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -481,7 +481,7 @@ def objects():
verify(not hasattr(a, "foo"))
try:
a.foo = 12
- except TypeError:
+ except (AttributeError, TypeError):
pass
else:
verify(0, "object() should not allow setting a foo attribute")