Hacker News new | ask | show | jobs
by kortilla 1846 days ago
This warning is very important. It’s absolutely not expected that generating tests means executing module code, side effects and all.
2 comments

Was anyone thinking it would "break" their computer just generating the tests? I would have though that only such a thing could happen later particularly if your python code was doing a bunch of file related stuff.
You wouldn't expect it to load the module to inspect it? Loading a module executes top-level code.
You’re confusing loading the module vs executing every method inside. I would not expect loading a module that has dangerous methods to do the destructive thing by default.