summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_file.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2005-04-20 19:41:36 (GMT)
committerBarry Warsaw <barry@python.org>2005-04-20 19:41:36 (GMT)
commitb180c06a54a9eb0012f8102e993b9c3e8f1d7f21 (patch)
tree661a16bb6215f6dfe843d05dae351f75968e7120 /Lib/test/test_file.py
parente890682e521ad90eac91196d151b796edf00c3fa (diff)
downloadcpython-b180c06a54a9eb0012f8102e993b9c3e8f1d7f21.zip
cpython-b180c06a54a9eb0012f8102e993b9c3e8f1d7f21.tar.gz
cpython-b180c06a54a9eb0012f8102e993b9c3e8f1d7f21.tar.bz2
Fix tests dependent on the exception raised by non-settable descriptors.
Diffstat (limited to 'Lib/test/test_file.py')
-rw-r--r--Lib/test/test_file.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py
index ddd0471..af8eadf 100644
--- a/Lib/test/test_file.py
+++ b/Lib/test/test_file.py
@@ -34,10 +34,10 @@ f.softspace = softspace # merely shouldn't blow up
for attr in 'name', 'mode', 'closed':
try:
setattr(f, attr, 'oops')
- except TypeError:
+ except (AttributeError, TypeError):
pass
else:
- raise TestFailed('expected TypeError setting file attr %r' % attr)
+ raise TestFailed('expected exception setting file attr %r' % attr)
f.close()
# verify writelines with instance sequence