diff options
author | Collin Winter <collinw@gmail.com> | 2007-03-28 21:44:53 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-03-28 21:44:53 (GMT) |
commit | 42dae6a89bd24073ae1b66599180cc94f15ff232 (patch) | |
tree | 7df2ee86dc68b54e0b207eaa6862bfc82272e382 /Lib/test/test_csv.py | |
parent | d84da1b67a12df114de2f76e0644174f07f2c834 (diff) | |
download | cpython-42dae6a89bd24073ae1b66599180cc94f15ff232.zip cpython-42dae6a89bd24073ae1b66599180cc94f15ff232.tar.gz cpython-42dae6a89bd24073ae1b66599180cc94f15ff232.tar.bz2 |
Make readonly members defined in C throw an AttributeError on modification. This brings them into sync with Python-level attributes. Fixes bug #1687163.
Diffstat (limited to 'Lib/test/test_csv.py')
-rw-r--r-- | Lib/test/test_csv.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_csv.py b/Lib/test/test_csv.py index 46361c8..2cdc807 100644 --- a/Lib/test/test_csv.py +++ b/Lib/test/test_csv.py @@ -53,8 +53,8 @@ class Test_Csv(unittest.TestCase): self.assertEqual(obj.dialect.skipinitialspace, False) self.assertEqual(obj.dialect.strict, False) # Try deleting or changing attributes (they are read-only) - self.assertRaises(TypeError, delattr, obj.dialect, 'delimiter') - self.assertRaises(TypeError, setattr, obj.dialect, 'delimiter', ':') + self.assertRaises(AttributeError, delattr, obj.dialect, 'delimiter') + self.assertRaises(AttributeError, setattr, obj.dialect, 'delimiter', ':') self.assertRaises(AttributeError, delattr, obj.dialect, 'quoting') self.assertRaises(AttributeError, setattr, obj.dialect, 'quoting', None) |