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

Python: user assertions without messages are too silent #24

Closed
Expurple opened this issue Apr 22, 2022 · 1 comment
Closed

Python: user assertions without messages are too silent #24

Expurple opened this issue Apr 22, 2022 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@Expurple
Copy link

When solution contains an assert statement (simple form, without a message) and that assert fails, tests are aborted without any error messages at all. It's hard to understand what's going on.

To reproduce: train on any Python kata, submit a function with assert False in its body. Compare with assert False, "User assertion failed".

I'm not sure what can/should be done here, but it just felt very confusing, I had to debug my solution locally. I often add asserts to find bugs early. Without messages, of course. Initially I expected a full traceback, like from raise RuntimeError(). That would be very useful for debugging without a local IDE. But it looks like AssertionError is used by the test framework, so it's displayed differently.

@kazk kazk transferred this issue from codewars/runner May 4, 2022
@Blind4Basics
Copy link
Contributor

same as #13, isn't it?

@kazk kazk added duplicate This issue or pull request already exists and removed kind/feature-request labels May 4, 2022
@kazk kazk closed this as completed May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants