@@ -116,7 +116,7 @@ def test_object_setattr(self):
116116 self .assertRaises (RuntimeError , xsetattr , obj , 'evil' , NULL )
117117
118118 self .assertRaises (RuntimeError , xsetattr , obj , 'evil' , 'good' )
119- self .assertRaises (NotWriteableError , xsetattr , 42 , 'a' , 5 )
119+ self .assertRaises (AttributeError , xsetattr , 42 , 'a' , 5 )
120120 self .assertRaises (TypeError , xsetattr , obj , 1 , 5 )
121121 # CRASHES xsetattr(obj, NULL, 5)
122122 # CRASHES xsetattr(NULL, 'a', 5)
@@ -136,7 +136,7 @@ def test_object_setattrstring(self):
136136 self .assertRaises (RuntimeError , setattrstring , obj , b'evil' , NULL )
137137
138138 self .assertRaises (RuntimeError , setattrstring , obj , b'evil' , 'good' )
139- self .assertRaises (NotWriteableError , setattrstring , 42 , b'a' , 5 )
139+ self .assertRaises (AttributeError , setattrstring , 42 , b'a' , 5 )
140140 self .assertRaises (TypeError , setattrstring , obj , 1 , 5 )
141141 self .assertRaises (UnicodeDecodeError , setattrstring , obj , b'\xff ' , 5 )
142142 # CRASHES setattrstring(obj, NULL, 5)
@@ -153,7 +153,7 @@ def test_object_delattr(self):
153153 xdelattr (obj , '\U0001f40d ' )
154154 self .assertFalse (hasattr (obj , '\U0001f40d ' ))
155155
156- self .assertRaises (NotWriteableError , xdelattr , 42 , 'numerator' )
156+ self .assertRaises (AttributeError , xdelattr , 42 , 'numerator' )
157157 self .assertRaises (RuntimeError , xdelattr , obj , 'evil' )
158158 self .assertRaises (TypeError , xdelattr , obj , 1 )
159159 # CRASHES xdelattr(obj, NULL)
@@ -170,7 +170,7 @@ def test_object_delattrstring(self):
170170 delattrstring (obj , '\U0001f40d ' .encode ())
171171 self .assertFalse (hasattr (obj , '\U0001f40d ' ))
172172
173- self .assertRaises (NotWriteableError , delattrstring , 42 , b'numerator' )
173+ self .assertRaises (AttributeError , delattrstring , 42 , b'numerator' )
174174 self .assertRaises (RuntimeError , delattrstring , obj , b'evil' )
175175 self .assertRaises (UnicodeDecodeError , delattrstring , obj , b'\xff ' )
176176 # CRASHES delattrstring(obj, NULL)
0 commit comments