Open bryceadam1 opened 3 years ago
Hi @bryceadam1! Sorry for the delay in getting back to you. I think this behavior is from the unittest
library itself (we are simply calling test.shortDescription
to populate this), so if you're seeing different behavior on your Macbook I wonder if the Python versions are different? We are now defaulting to Python 3 everywhere, and now that we have different Ubuntu base image versions newer versions might have newer versions of Python 3
If you can, please let us know if you are still seeing this issue. Thank you!
Description Naming test cases with a new-line character on the first line causes the name of the function to be placed in the
results.json
file instead of the human-readable name in the docstring of the testcase.To Reproduce Create a testcase and name it with a docstring that has a new-line character on the first line. This file is called
tests.py
.Running the above with the
JSONTestRunner
provided ingradescope_utils
produces the following results.json:Expected behavior Should have produced the following
results.json
file:Additional context Removing the new-line character seems to fix the issue. I.e. the following produces the expected result.
This also seems to only be the case inside of Gradescope's docker containers used for actually grading student submissions. This did not happen when I ran the code on my macbook.