Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
- Refactored the method of loading `javascripts/Results/keybinding.js` in `submission_selector.jsx` (#7566)
- Updated the instructor table to use `@tanstack/react-table` v8 (#7589)
- Refactor `DropDownMenu` class to a new React component (#7592)
- Updated Python autotest script file to include example of using `pytest.mark` to customize test marks (#7597)

## [v2.7.1]

Expand Down
12 changes: 12 additions & 0 deletions db/data/autotest_files/py/script_files/test2.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,15 @@ def test_with_markers(request):
request.node.add_marker(pytest.mark.markus_overall_comments(
"Here is some general feedback for this submission."
))


def test_with_partial_credit(request):
"""This test gives the student a score of 1/2."""
request.node.add_marker(pytest.mark.markus_marks_earned(0))
request.node.add_marker(pytest.mark.markus_marks_total(2))


def test_with_bonus(request):
"""This test gives the student a score of 3/2."""
request.node.add_marker(pytest.mark.markus_marks_earned(3))
request.node.add_marker(pytest.mark.markus_marks_total(2))