5 ms·
Pynguin executes the module under test! As a consequence, depending on what code is in that module, running Pynguin can cause serious harm to your computer, for
by vs2 5y ago
Pynguin executes the module under test! As a consequence, depending on what code is in that module, running Pynguin can cause serious harm to your computer, for example, wipe your entire hard disk! We recommend running Pynguin in an isolated environment, for example, a Docker container, to minimise the risk of damaging your system.
- ptx 5y agoThis 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.