-
-
Notifications
You must be signed in to change notification settings - Fork 636
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
Fix broken engine_error
testutil decorator.
#15818
Changes from all commits
f3c3296
bbe1182
23866e2
9274773
00f8f10
4c9da86
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -69,6 +69,8 @@ def rule_runner() -> RuleRunner: | |||
) | ||||
|
||||
|
||||
@pytest.mark.skip(reason="TODO(#15824)") | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the correct way to skip tests? I got this:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add
cc @thejcannon if the error message could be improved There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That comes from Line 21 in 95f28ba
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, there it is. That explains why I didn't find anything on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I love how customizable pytest is. |
||||
@pytest.mark.no_error_if_skipped | ||||
def test_choose_compatible_resolve(rule_runner: RuleRunner) -> None: | ||||
def create_target_files( | ||||
directory: str, *, req_resolve: str, source_resolve: str, test_resolve: str | ||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,6 +135,11 @@ def engine_error( | |
f"expected: {contains}\n\n" | ||
f"exception: {underlying}" | ||
) | ||
else: | ||
raise AssertionError( | ||
"DID NOT RAISE ExecutionError with underlying exception type " | ||
f"{expected_underlying_exception}." | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Eric-Arellano I completely missed this in the review of #13108, I guess I got lost during one of the major refactorings in that PR.. |
||
|
||
|
||
# ----------------------------------------------------------------------------------------------- | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should've caught this issue when I wrote this... alas I did not :P
I did catch this issue now, however, when using the engine_error decorator on the visibility tests.