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

Investigate why FileNotFoundError not captured when escalate mode is off #48

Open
lmmx opened this issue Oct 29, 2022 · 1 comment
Open

Comments

@lmmx
Copy link
Owner

lmmx commented Oct 29, 2022

The test test_parse_file_deleted in parse_test.py initially was written with a conditional block splitting on escalate, like the preceding test test_parse_file_error, but I then discovered that it doesn't respect the flag, and raises an error regardless.

lmmx added a commit that referenced this issue Oct 29, 2022
@lmmx
Copy link
Owner Author

lmmx commented Oct 29, 2022

I commented this code out rather than delete it, for reference if this gets resolved in future and wants a test for the non-escalating case:

mvdef/tests/parse_test.py

Lines 110 to 115 in b031b78

# TODO: fix #48
# parsed = parse_file(p, escalate=escalate)
# assert parsed is None
# captured = capsys.readouterr()
# stderr_cut = captured.err.split(":", 1)[1]
# assert stderr_cut == "" # stored_error

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

1 participant