mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
Make readonly members defined in C throw an AttributeError on modification. This brings them into sync with Python-level attributes. Fixes bug #1687163.
This commit is contained in:
parent
d84da1b67a
commit
42dae6a89b
5 changed files with 9 additions and 9 deletions
|
|
@ -143,7 +143,7 @@ class StatAttributeTests(unittest.TestCase):
|
|||
try:
|
||||
result.st_mode = 1
|
||||
self.fail("No exception thrown")
|
||||
except TypeError:
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
try:
|
||||
|
|
@ -201,7 +201,7 @@ class StatAttributeTests(unittest.TestCase):
|
|||
try:
|
||||
result.f_bfree = 1
|
||||
self.fail("No exception thrown")
|
||||
except TypeError:
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue