JMU-CS / JMU-CS/jmu_python_gradescope_utils
Automatically generate hints that show test inputs
- Dominant language
- Python
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Another idea from today's meeting. We have a lot of test code like this:
``` py
actual = addressing.generate_addresses("Carrier Drive", 1000, 1030, 10)
self.assertEquals(['1000 Carrier Drive', '1010 Carrier Drive', '1020 Carrier Drive'],
actual, msg='generate_addresses("Carrier Drive", 1000, 1030, 10)')
```
We could write new methods (Ex: `assertEqualHint`) that takes `function`, `args` (as a tuple), and `expected` as parameters, generates the `msg` automatically, calls the function with the given arguments, and then does the assertion. That would also make giving consistent and correct feedback easier. Sometimes instructors accidentally do (expected, actual) based on JUnit, which is confusing, because students think the expected value is what their function returned.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.