AndreasArne / python-examination

MIT License
0 stars 0 forks source link

Crashes if there are no files to test #4

Open AndreasArne opened 3 years ago

AndreasArne commented 3 years ago

If the students folders are empty the program crashes ugly. Make it crash pretty

Traceback (most recent call last):
  File "/home/zeldah/git/python-examination/test/python/.dbwebb/test/examiner/run_tests.py", line 64, in run_testcases
    assignments_results = runner.run(suite).assignments_results
  File "/usr/lib/python3.9/unittest/runner.py", line 183, in run
    result.printErrors()
  File "/home/zeldah/git/python-examination/test/python/.dbwebb/test/examiner/exam_test_result.py", line 88, in printErrors
    self.printErrorListWithExplenation("Error", self.errors, "Your code crasched!", True)
  File "/home/zeldah/git/python-examination/test/python/.dbwebb/test/examiner/exam_test_result.py", line 114, in printErrorListWithExplenation
    if not test.assignment in already_printed_assignments:
AttributeError: '_ErrorHolder' object has no attribute 'assignment'
AndreasArne commented 3 years ago

Need more data, can't reproduce.

AndreasArne commented 3 years ago

Might be if they dont have done "dbwebb init".