mirror of
https://github.com/python/cpython.git
synced 2025-11-26 13:22:51 +00:00
The assignment to result.st_rdev can raise AttributeError as well as
TypeError (on systems where it's not defined at all, it raises AttributeError; when it's defined, assignment to it raises TypeError).
This commit is contained in:
parent
a5e616510e
commit
1fff878c45
1 changed files with 1 additions and 1 deletions
|
|
@ -111,7 +111,7 @@ class StatAttributeTests(unittest.TestCase):
|
||||||
try:
|
try:
|
||||||
result.st_rdev = 1
|
result.st_rdev = 1
|
||||||
self.fail("No exception thrown")
|
self.fail("No exception thrown")
|
||||||
except TypeError:
|
except (AttributeError, TypeError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue