Skip to content

Commit 4784cd0

Browse files
make the linter happy
1 parent 12fa6d5 commit 4784cd0

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

marking_and_admin/test_shim.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@ def do_the_test(repo_path):
2525
test = importlib.util.module_from_spec(spec)
2626
spec.loader.exec_module(test)
2727
print("about to test", repo_path)
28-
r = test.theTests(repo_path)
29-
r["localError"] = ":)"
30-
return r
31-
except Exception as e:
28+
results = test.theTests(repo_path)
29+
results["localError"] = ":)"
30+
return results
31+
except Exception as mystery_error:
3232
return {
3333
"of_total": 0,
3434
"mark": 0,
35-
"localError": str(e).replace(",", "~"), # the comma messes with the csv
35+
"localError": str(mystery_error).replace(",", "~"),
36+
# the comma messes with the csv
3637
}
3738

3839

@@ -70,9 +71,9 @@ def results_as_json(repo_path):
7071
"""
7172
)
7273

73-
with open("temp_results.json", "w") as temp_results:
74-
results = results_as_json(REPO_PATH)
75-
temp_results.write(results)
74+
with open("temp_results.json", "w", encoding="utf-8") as temp_results:
75+
test_results = results_as_json(REPO_PATH)
76+
temp_results.write(test_results)
7677
sleep(0.50)
7778

7879
sleep(0.50)

0 commit comments

Comments
 (0)