Hacker News new | past | comments | ask | show | jobs | submit login

This will break other tests because there is no logic here for reverting SomeClass back to it's previous behaviour. Use the patch function as a decorator or as a context.



Yes, this is an anti-pattern, not an example of a useful piece of code :)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: