Skip to content

Customizing assertions is slightly broken #137

@acbart

Description

@acbart

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.

Metadata

Metadata

Assignees

Labels

Assertions ToolIssues pertaining to the Assertions tool (declarative statements about student code)bugSomething isn't workingenhancementNew feature or requestgood first issueGood for newcomers

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions