@@ -204,9 +204,11 @@ def __mro__(self):
204204 raise AssertionError ("custom mro executed" )
205205
206206 a = 1
207-
207+
208+
208209member_descriptor = type (Slots .s1 )
209210
211+
210212class TestSafeGetAttribute (unittest .TestCase ):
211213 def test_lookup_on_object (self ):
212214 a = A ()
@@ -222,12 +224,11 @@ def test_lookup_on_object(self):
222224 self .assertEqual (inspection .hasattr_safe (b , "y" ), True )
223225 self .assertEqual (inspection .hasattr_safe (b , "b" ), True )
224226
225-
226227 def test_avoid_running_properties (self ):
227228 p = Property ()
228229 self .assertEqual (inspection .getattr_safe (p , "prop" ), Property .prop )
229230 self .assertEqual (inspection .hasattr_safe (p , "prop" ), True )
230-
231+
231232 def test_lookup_with_slots (self ):
232233 s = Slots ()
233234 s .s1 = "s1"
@@ -269,10 +270,14 @@ def test_lookup_on_overridden_methods(self):
269270 with self .assertRaises (AttributeError ):
270271 sga (OverriddenMRO (), "b" )
271272
272- self .assertEqual (inspection .hasattr_safe (OverriddenGetattr (), "b" ), False )
273- self .assertEqual (inspection .hasattr_safe (OverriddenGetattribute (), "b" ), False )
273+ self .assertEqual (
274+ inspection .hasattr_safe (OverriddenGetattr (), "b" ), False
275+ )
276+ self .assertEqual (
277+ inspection .hasattr_safe (OverriddenGetattribute (), "b" ), False
278+ )
274279 self .assertEqual (inspection .hasattr_safe (OverriddenMRO (), "b" ), False )
275-
280+
276281
277282if __name__ == "__main__" :
278283 unittest .main ()
0 commit comments