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

Fix error_case test gen to check for 'score' prpty #2840

Merged
merged 2 commits into from
Jan 5, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions exercises/practice/bowling/.meta/template.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
rolls = {{ input["previousRolls"] }}
game = self.roll_new_game(rolls)
{% if case is error_case -%}
{% set property = case["property"] -%}
with self.assertRaisesWithMessage(Exception):
{% if property == 'score' -%}
game.score()
{% else -%}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense for this to explicitly check the property value?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IsaacG - The CI for this has not run (as previously asked -- please run the CI and make sure it passes before reviewing. If you cannot run the CI, please do not review.).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do believe I cannot run the CI.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refrain from reviewing PRs that require a manually triggered CI run then. Thanks.

game.roll({{ input["roll"] }})
{% endif -%}
{% else -%}
self.assertEqual(game.score(), {{ case["expected"] }})
{% endif %}
Expand Down