4 ms·
This warning quoted from the README doesn't seem to suggest anything unexpected or unusual. Obviously running the tests would execute the module under test. (A
by ptx 5y ago
This warning quoted from the README doesn't seem to suggest anything unexpected or unusual. Obviously running the tests would execute the module under test.
(Although I suppose if someone wanted to generate tests without ever executing them the warning would be relevant.)
- Ensorceled 5y agoI admit to being surprised by that ... I assumed it generated tests (you know, like it says) that I could then inspect those tests and run. If you know how it works, then of course it is creating tests by running the code.
- kortilla 5y agoThis warning is very important. It’s absolutely not expected that generating tests means executing module code, side effects and all.
- stjohnswarts 5y agoWas 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.
- ptx 5y agoYou wouldn't expect it to load the module to inspect it? Loading a module executes top-level code.
- kortilla 5y agoYou’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.