<filename>db/data/autotest_files/autotest01/student_files/leave_file_behind_B/submission.py<gh_stars>1-10
#!/usr/bin/env python

"""
This student submission file is used to test the autotester
It represents the test case where:

  This submission checks if a file left over from running
  leave_file_behind_A/submission.py is still there
"""
import os
import json

filename = 'abandoned_file.txt'

if os.path.isfile(filename):
  print(json.dumps({'name': 'leave_file_behind_test_B', 'input': 'NA', 'expected': 'NA', 'actual': 'file still there', 'marks_earned': 0, 'marks_total': 2, 'status': 'fail'}))
else:
  print(json.dumps({'name': 'leave_file_behind_test_B', 'input': 'NA', 'expected': 'NA', 'actual': 'file removed successfully', 'marks_earned': 2, 'marks_total': 2, 'status': 'pass'}))
