@@ -248,4 +248,16 @@ def test_submit_max_dir_size(self, exchange, cache, course_dir):
248248 self ._make_file (join ("ps1" , "large_file" ), contents = "x" * 2001 )
249249 with pytest .raises (RuntimeError ):
250250 self ._submit ("ps1" , exchange , cache ,
251- flags = ['--CourseDirectory.max_dir_size=3' ])
251+ flags = ['--CourseDirectory.max_dir_size=3' ])
252+
253+ def test_ensure_timestamp (self , exchange , cache , course_dir ):
254+ # Ensure timestamp is created even if something goes wrong in submitting
255+ # If timestamp is not created, feedback workflow can be broken
256+ # see: https://github.com/jupyter/nbgrader/pull/1755
257+ self ._release_and_fetch ("ps1" , exchange , cache , course_dir )
258+ os .chmod ("ps1/p1.ipynb" , 0o244 )
259+ with pytest .raises (OSError ):
260+ self ._submit ("ps1" , exchange , cache )
261+ os .chmod ("ps1/p1.ipynb" , 0o644 )
262+ dirname = os .listdir (join (exchange , "abc101" , "inbound" ))[0 ]
263+ assert os .path .isfile (join (exchange , "abc101" , "inbound" , dirname , "timestamp.txt" ))
0 commit comments