New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompetent mutants in 0.5.1 and 0.6.0 #52
Comments
Hi, thanks for reporting. What I found out so far: MutPy modifies a module's AST in order to create mutants. When doing that it removes the actual module by running
NumPy seems to have issues with that behavior: numpy/numpy#14384 Now my next step is to find out, why there are no issues with version 0.4.0. I keep you updated as soon as I find out more. |
Ok according to this issue numpy/numpy#13430 this error does not happen with NumPy versions below 1.16.0. And I just tested with with the latest MutPy + NumPy 1.15.4 and the error is gone. I try to find out more. |
@liam-m Could you try the MutPy from the branch bugfix/fix-numpy-import-issue and tell me whether it worked for you? |
@phihos I've cloned the repo and checked out that branch but unfortunately I'm still seeing this issue when running bin/mut.py
|
@liam-m I can not reproduce the issue with the new branch. I did the following steps: git clone https://github.com/mutpy/mutpy.git
cd mutpy
git checkout bugfix/fix-numpy-import-issue
cd ..
git clone https://github.com/liam-m/primes.py.git
cd primes.py
virtualenv venv
source venv/bin/activate
pip install ../mutpy
pip install -r requirements.txt
mut.py --target primes --unit-test test --timeout-factor 2 The timeout-factor parameter is just for infinite loops in mutated code being aborted quicker. Some commands might be slightly different depending on your setup. |
v0.6.1 seems to be working! |
Hi,
I last used mutpy in 2016 in my project https://github.com/liam-m/primes.py.
Coming back to this now, I found that the first mutant runs successfully but all subsequent ones are incompetent. This happens in 0.6.0 and 0.5.1 but not 0.4.0.
If you make the mutants individually using
--mutation-number
then it works as expected.To reproduce it should be sufficient to clone the repo then run
mut.py --target primes --unit-test test
I have Python 3.7.0.
The text was updated successfully, but these errors were encountered: