Recently I realized that the common errors, like SyntaxErrors import errors etc are not shown to students and they just see No Test Results, it would be useful if the students can see these (stderr) error messages.
All our tests are configured with Always display test output to students and line verbosity---I would like to keep this as is not to reveal too much information to the students for failing test cases.
An example is included below:
- In the submitted file some logic including the creation of
shakes_ds is wrapped in __main__ when importing the student file tests fail, I can see the stack trace from the instructor view but it appears as No Test Results to the student
Messages on stderr:
/data/markus/workspace/scripts/835/py_0/lib/python3.13/site-packages/_pytest/config/__init__.py:324: PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown.
Plugin: helpconfig, Hook: pytest_cmdline_parse
ConftestImportFailure: NameError: name 'shakes_ds' is not defined (from /data/markus/workspace/workers/autotst0/conftest.py)
For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning
config = pluginmanager.hook.pytest_cmdline_parse(
ImportError while loading conftest '/data/markus/workspace/workers/autotst0/conftest.py'.
conftest.py:3: in <module>
import fall25_hw6_rnn as student
fall25_hw6_rnn.py:274: in <module>
shakes_data = CharDataset(num_steps=32, raw_text=shakes_ds[:50000])
E NameError: name 'shakes_ds' is not defined
Recently I realized that the common errors, like SyntaxErrors import errors etc are not shown to students and they just see
No Test Results, it would be useful if the students can see these (stderr) error messages.All our tests are configured with
Always display test output to studentsand line verbosity---I would like to keep this as is not to reveal too much information to the students for failing test cases.An example is included below:
shakes_dsis wrapped in__main__when importing the student file tests fail, I can see the stack trace from the instructor view but it appears asNo Test Resultsto the student