GithubHelp home page GithubHelp logo

Can't run mutmut about mutmut HOT 5 CLOSED

boxed avatar boxed commented on June 18, 2024
Can't run mutmut

from mutmut.

Comments (5)

JamieYnonan avatar JamieYnonan commented on June 18, 2024 1

Thanks @boxed , I changed the command:
mutmut run --paths-to-mutate=$PROJECT --tests-dir=$TESTS_DIR --runner="pytest"

I also had a class that gave me problems.

Thanks.

from mutmut.

boxed avatar boxed commented on June 18, 2024

Strange. That looks like this bug in click: pallets/click#494 but it's supposed to be fixed in 2016. What version of click did you end up with?

from mutmut.

JamieYnonan avatar JamieYnonan commented on June 18, 2024

Thanks @boxed , I updated the click's version (from 6.0 to 7.0) and now I have this error:

mutmut cache is out of date, clearing it...
1. Running tests without mutations
⠋ Running...Traceback (most recent call last):
  File "/usr/local/bin/mutmut", line 5, in <module>
    climain()
  File "/usr/local/lib64/python3.5/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib64/python3.5/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib64/python3.5/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib64/python3.5/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/mutmut/__main__.py", line 66, in wrapper
    f(*args, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/mutmut/__main__.py", line 204, in climain
    version, suspicious_policy, untested_policy))
  File "/usr/local/lib/python3.5/site-packages/mutmut/__main__.py", line 295, in main
    using_testmon=using_testmon
  File "/usr/local/lib/python3.5/site-packages/mutmut/__main__.py", line 579, in time_test_suite
    raise RuntimeError("Tests don't run cleanly without mutations. Test command was: %s\n\nOutput:\n\n%s" % (test_command, '\n'.join(output)))
RuntimeError: Tests don't run cleanly without mutations. Test command was: python -m pytest -x

Output:

/usr/bin/python: No module named pytest

pip-3.5 install -r requirements.txt

...
mutmut==1.3.1
pytest==4.2.0
click==7.0
coverage==4.5.1

from mutmut.

boxed avatar boxed commented on June 18, 2024

Mutmut guesses you use pytest for tests since that's by far the most popular (and best) test runner. It seems you don't. You need to set the test runner command in setup.cfg as per the Readme.

from mutmut.

boxed avatar boxed commented on June 18, 2024

I'd recommend to put those settings in setup.cfg so you don't need to remember them and can just run mutmut run.

from mutmut.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.