Skip to content
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

Can't run mutmut Windows 10 #125

Closed
LLKoder opened this issue May 19, 2019 · 10 comments
Closed

Can't run mutmut Windows 10 #125

LLKoder opened this issue May 19, 2019 · 10 comments

Comments

@LLKoder
Copy link

LLKoder commented May 19, 2019

My project structure.

project
|-my_project\
|-tests\
|-venv.tests\
|-setup.cfg

My setup.cfg:

[mutmut]
runner="python -m unittest discover"
paths-to-mutate="my_project\"
tests-dir="tests\"

When I run python -m mutmut run from project I get an error:

Traceback (most recent call last):
  File "C:\Users\...\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\...\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "X:\Projects\project\venv.tests\lib\site-packages\mutmut\__main__.py", line 784, in <module>
    climain()
  File "X:\Projects\project\venv.tests\lib\site-packages\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "X:\Projects\project\venv.tests\lib\site-packages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "X:\Projects\project\venv.tests\lib\site-packages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "X:\Projects\project\venv.tests\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "X:\Projects\project\venv.tests\lib\site-packages\mutmut\__main__.py", line 74, in wrapper
    f(*args, **kwargs)
  File "X:\Projects\project\venv.tests\lib\site-packages\mutmut\__main__.py", line 254, in climain
    post_mutation, use_patch_file))
  File "X:\Projects\project\venv.tests\lib\site-packages\mutmut\__main__.py", line 352, in main
    using_testmon=using_testmon
  File "X:\Projects\project\venv.tests\lib\site-packages\mutmut\__main__.py", line 689, in time_test_suite
    returncode = popen_streaming_output(test_command, feedback)
  File "X:\Projects\project\venv.tests\lib\site-packages\mutmut\__main__.py", line 459, in popen_streaming_output
    stderr=subprocess.PIPE
  File "C:\Users\...\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "C:\Users\...\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 1178, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
@boxed
Copy link
Owner

boxed commented May 19, 2019

Hmm... Sounds like it isn't finding python. If you change the runner command to the absolute path to the python in the venv, does it work?

@LLKoder
Copy link
Author

LLKoder commented May 19, 2019

No, it doesn't help.

@boxed
Copy link
Owner

boxed commented May 20, 2019

@nklapste maybe you can help?

@nklapste
Copy link
Collaborator

@LLKoder could you try a config similar too:

[mutmut]
runner=C:\\path\\to\\your\\project\\venv\\Scripts\\python.exe -m unittest discover

For specifying your runner?

I found my runtime was tripping over python escaping \ weirdly.

@jayvdb
Copy link
Contributor

jayvdb commented Sep 4, 2019

Based on other issues, it appears that there are Windows users of mutmut, so this probably isnt a problem, but it is worth noting that dependency whatthepatch has some features which are not supported on Windows, and has no Windows CI to maintain support. cscorley/whatthepatch#26 . However I noticed that mutmut tests depended patch & ed on unix, so maybe it is a relevant problem for Windows.

And there is no Windows CI for mutmut, or for https://github.com/TriOptima/tri.declarative or its dependencies. @nklapste / @boxed , do you have a preference for Windows CI provider?

@jayvdb
Copy link
Contributor

jayvdb commented Sep 4, 2019

(ah, I see the Travis CI here is using the new Windows Travis support. nice!)

jayvdb added a commit to jayvdb/mutmut that referenced this issue Sep 4, 2019
@jayvdb
Copy link
Contributor

jayvdb commented Sep 4, 2019

This specific problem would be fixed by #134

@boxed
Copy link
Owner

boxed commented Sep 7, 2019

@jayvdb Does this mean this issue can be closed when #134 is merged?

@moltob
Copy link

moltob commented Sep 7, 2021

Probably also fixed by #220.

@boxed
Copy link
Owner

boxed commented Oct 20, 2024

I just released mutmut 3, which is a big rewrite. I believe this issue no longer applies anymore. Feel free to reopen it if it still exists.

Windows is only going to work with WSL with mutmut 3.

@boxed boxed closed this as completed Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants