-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
[Guidos Gorgeous Lasagna]: Tests Fail With Confusing pytest error if Student uses input()
#101
Comments
This comment was marked as resolved.
This comment was marked as resolved.
Hi @CodebyKhayla 👋🏽 Thank you for filing this issue! That is indeed concerning. I'm assuming that you tested your code via the website (please let me know if that's not the case). When I tried that exercise through the UI just now, I didn't receive that error - but that doesn't mean we don't have a problem. Could you possibly provide the code you were testing, and any other details you can remember? That would be super helpful in tracking this down. Many thanks. |
Hi @BethanyG ! Wow, thanks for getting back to me so quickly. I definitely think my code is still not the right answer to the exercise, however, here is a screenshot. |
Your code does indeed have an issue. On line 9, you are defining a parameter that accepts interactive arguments from the command line (I am assuming as a test on your own system??). Our tests and testing framework are not designed for this sort of parameter, and (as you can see by the error thrown) We might examine blocking that feature of Python altogether in our test environment so that other users don't get confused by the Meanwhile, commenting out line 9 should get the tests to run for you. Let me know if that doesn't fix the problem. |
Thanks @BethanyG ! I definitely thought it was because of something I was doing. Could it maybe be added to the instructions to not include input()? Either way, thanks again, you've been amazing |
🤔 As you have probably seen, the directions for this exercise are already quite long, and many students don't read them through to the end. Although maybe adding a comment in the stub to remind people could be a good addition. I will think about it. We may need to just be up front with students and have a general doc that outlines the We will probably have exercises that do use I'll keep this with a "bug" flag while I take a bit to think what we might want to do here. Thanks again for filing the issue -- and for providing the additional information! |
input()
Transferred issue here, because it most likely needs a solution in the runner. |
clicked "Run Tests" Got the following error:
We received the following error when we ran your code:
OSError: pytest: reading from stdin while output is captured! Consider using
-s
.The text was updated successfully, but these errors were encountered: