Open sk- opened 12 years ago
I found the cause of this issue. The problem is that the method of Stub _property_called_name relies on getframeinfo of module inspect. This module relies also on function os.path.exists. So when the replace of exists is made affects all the flow.
My suggestion would be to not call _replace_all for modules like ludibrio or inspect (a more finer exception could be made). I would be happy to provide the patch, but I'd definitely need some guidance, because I tried some patches and somehow I lost the Stub for the exists method. (i.e, after the import the exists is no longer a Stub but a function)
I bumped into this issue too. Is there a fix?
Please see the test below. The first test fails with an infinite recursion and the second works just great.