You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the CS 149 planning meeting today, we had the idea to combine these two tests into one. The code in test_submission_count could be added to assertRequiredFilesPresent.
@weight(0)deftest_submission_count(self):
"""Submission count"""try:
meta=json.load(open("/autograder/submission_metadata.json"))
exceptFileNotFoundError:
print("WARNING: metadata not found (please notify your instructor)")
return# This error should happen only when testing the autogradercount=1+len(meta["previous_submissions"])
stamp=datetime.fromisoformat(meta["created_at"])
stamp+=timedelta(hours=3) # Pacific to Easternstamp=stamp.strftime("%b %d at %H:%M:%S")
print(f"Submission {count} ({stamp})")
@required()@weight(0)deftest_submitted_files(self):
"""Check submitted files"""self.assertRequiredFilesPresent([FILENAME])
In addition, assertRequiredFilesPresent could enforce a submission limit:
@required()@weight(0)deftest_submission_count(self):
"""Submission count"""try:
meta=json.load(open("/autograder/submission_metadata.json"))
exceptFileNotFoundError:
print("WARNING: metadata not found (please notify your instructor)")
return# This error should happen only when testing the autogradercount=1+len(meta["previous_submissions"])
print(f"Submission {count} of {MAX_SUBMISSIONS}")
ifcount>MAX_SUBMISSIONS:
self.fail("Limit exceeded. Please click the Submission History button ""and activate the submission you would like us to grade.\n")
The text was updated successfully, but these errors were encountered:
During the CS 149 planning meeting today, we had the idea to combine these two tests into one. The code in
test_submission_count
could be added toassertRequiredFilesPresent
.In addition,
assertRequiredFilesPresent
could enforce a submission limit:The text was updated successfully, but these errors were encountered: