JMU-CS / JMU-CS/jmu_pytest_utils
Add partial_credit function to coverage,py
Open
- Dominant language
- Python
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Something like:
```py
def partial_credit(score, output="Partial credit.\n") -> None:
"""Give partial credit for passing some of the asserts.
Sets the `score` and `output` attributes of the test function.
"""
test_func = get_caller()
test_func.score = score
test_func.output = output
```
Also modify the `half_credit()` function to use an output parameter with default value.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.