JMU-CS / JMU-CS/jmu_pytest_utils

Add partial_credit function to coverage,py

Open
#27 0 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.