Replies: 1 comment 3 replies
-
this is outside of the scope of pytest core itself however it would be a perfect fit for a custom plugin that would output grading stats and details the test weights are typically no longer available at the final stat step, they need to be transferred when the report is handled this however practically requires to redo the stats the terminal plugin did |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm writing a small pyTestExam plugin (not yet structured as it) to test and grade computer exams, see https://gitlab.in2p3.fr/ycopin/pyTestExam. I can count the passed and failed tests (see
pytest_terminal_summary
in https://gitlab.in2p3.fr/ycopin/pyTestExam/-/blob/master/conftest.py), but I would now like to add weights to the different tests, as they are not all of equal difficulty.I guess I would use the mark mechanism for the weighting:
but I did not find how to access the individual test weights in the final
pytest_terminal_summary
to compute a weighted sum of passed and failed tests. Help and comments are welcome!Beta Was this translation helpful? Give feedback.
All reactions