Open zzctmac opened 3 days ago
Hi,
It depends on what you are trying to do. In theory, Pynguin can already create tests for numpy, the problem is that if numpy crashes, this can cause the Python interpreter to crash and therefore Pynguin to crash. That's why I created a mode of execution that runs the tests in a subprocess to handle such cases (https://github.com/BergLucas/pynguin/tree/improvement/process-based-tests-execution). However, for numpy, there's also a problem with the data structures because it's rare to generate a matrix randomly. That's why I've also created a plugin system allowing you to add less random data structures (tensors in this case https://github.com/BergLucas/pynguin/tree/subprocess%2Bplugin-system%2Btensor). I've already tried to create tests for numpy for my little benchmark but there are a lot of numpy modules that don't load properly if we don't use the numpy
module directly so it's quite complicated to generate tests for this library.
If you still want to try, you can just install the version of Pynguin in the subprocess+plugin-system+tensor
branch and then run Pynguin with the --subprocess --plugins pynguin.plugins.tensor_fuzzer.int_tensor_plugin
arguments. This repository is mainly there to replicate my results and to do benchmarks but if you just want to run Pynguin, it's easier to install Pynguin on the right branch directly.
@BergLucas Thanks! I will try it.
@BergLucas By the way, since you had tested NumPy, could you share the config csv file like the pandas csv?
Hi! I am very interested in testing ML libs and this project. This project can test pandas, sklearn, scipy, and polars. My question is, what do I need to do to let this project test NumPy? Do I need to add a grammar fuzzing plugin?