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

Customizing assertions is slightly broken #137

Open
acbart opened this issue Jan 25, 2025 · 0 comments
Open

Customizing assertions is slightly broken #137

acbart opened this issue Jan 25, 2025 · 0 comments
Labels
Assertions Tool Issues pertaining to the Assertions tool (declarative statements about student code) bug Something isn't working enhancement New feature or request good first issue Good for newcomers

Comments

@acbart
Copy link
Collaborator

acbart commented Jan 25, 2025

You're supposed to be able to customize runtime (and static) assertions in a few different ways: providing custom assertion, explanation, expected_verb, aggregate_verb, etc. However, this functionality is not working correctly because the assertions' conditions do not catch kwargs. That part is fairly easy to fix (though a little tedious), but this also exposed a minor issue: the way that we are handling the assertion, we are not actually interpolating variables. So you couldn't provide a message like "{left} was not {right}". Seems to me like we should probably support assertion_template, explanation_template, etc. We also need to make expected_verb and aggregate_verb available as parameters, not just class fields (and corresponding _template) versions.

@acbart acbart added Assertions Tool Issues pertaining to the Assertions tool (declarative statements about student code) bug Something isn't working enhancement New feature or request good first issue Good for newcomers labels Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Assertions Tool Issues pertaining to the Assertions tool (declarative statements about student code) bug Something isn't working enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant