-
Notifications
You must be signed in to change notification settings - Fork 394
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
pytest example fails on Windows #475
Comments
Hello @asteppke ,
Yes, that is correct... I made the choice to use single quotes as this seems to be more standard in unix-like terminals, but you're right, they don't work on Windows. Maybe we could add a comment saying that single quotes should be replaced with double quotes on Windows - would it have help? Or do you think double quotes are common enough and that we can use them in unix terminals as well?
Thank you! By the way, I'd be curious to read more, if you wanted to let us know how you're using pytest in the context of a notebook... Does it mean that you can only have functions, rather than code blocks, in your notebook? Or, are you using the |
Both options, either switching to double quotes completely or a short note that this is required on Windows would be fine.
Usually my code is split up in
When running this through Jupytext with Pytest the tests run fine. For exporting this to a module I use the active-ipynb tags so that the second cell in this example is not exported. This is also necessary if the cells have (unwanted) side effects or exceptions because Pytest chokes if the second cell in the example looks like
|
Thank you - I will take the second option. Thanks for letting us know also how you use In the end, I found out that I was not really using |
With the inclusion of the pytest functionality jupytext becomes even more valuable, that is highly appreciated.
The current example fails on Windows though:
leads to
This is probably caused by the difference in behavior when treating quotes by
cmd.exe
in comparison with other shells or operating systems. Changing the quotes works around this problem andruns without issues in both
cmd.exe
andpowershell
.The text was updated successfully, but these errors were encountered: