File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1831,7 +1831,6 @@ class KNew(object):
18311831 if k == 'abc' :
18321832 self .assertEqual (v , value )
18331833
1834- @unittest .skip ('Currently throws a StackOverflowException' )
18351834 def test_getattribute_getattr (self ):
18361835 # verify object.__getattribute__(name) will call __getattr__
18371836 class Base (object ):
@@ -1857,18 +1856,19 @@ def __getattr__(self, name): return 23
18571856 # verify __getattr__ gets called after __getattribute__ fails, not
18581857 # during the base call to object.
18591858 state = []
1859+ tc = self
18601860 class Derived (object ):
18611861 def __getattr__ (self , name ):
18621862 if name == "bar" :
1863- self .assertEqual (state , [])
1863+ tc .assertEqual (state , [])
18641864 return 23
18651865 raise AttributeError (name )
18661866 def __getattribute__ (self , name ):
18671867 try :
18681868 state .append ('getattribute' )
18691869 return object .__getattribute__ (self , name )
18701870 finally :
1871- self .assertEqual (state .pop (), 'getattribute' )
1871+ tc .assertEqual (state .pop (), 'getattribute' )
18721872
18731873 a = Derived ()
18741874 self .assertEqual (a .bar , 23 )
You can’t perform that action at this time.
0 commit comments