File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
import json
2
+ import sys
2
3
from pathlib import Path
3
4
4
5
from click .testing import CliRunner
@@ -33,8 +34,11 @@ def test_collect_autograding_tests_command():
33
34
34
35
result = runner .invoke (collect_autograding_tests_command )
35
36
assert result .exit_code == 0
36
- assert result .output == "processing lorem-ipsum/problem.toml\n "
37
- expected_file_path = Path ("./.github/classroom/autograding.json" )
37
+ if sys .platform == "win32" :
38
+ assert result .output == "processing lorem-ipsum\\ problem.toml\n "
39
+ else :
40
+ assert result .output == "processing lorem-ipsum/problem.toml\n "
41
+ expected_file_path = Path (".github" ) / "classroom" / "autograding.json"
38
42
assert expected_file_path .exists ()
39
43
with open (expected_file_path ) as f :
40
44
data = json .load (f )
Original file line number Diff line number Diff line change @@ -92,7 +92,8 @@ def test_populate_folder_with_filenames():
92
92
expected_files = ["a" , "b" , "c" ]
93
93
populate_folder_with_filenames (tmpdir , expected_files )
94
94
95
- result_names = [item .name for item in tmpdir_path .iterdir ()]
95
+ # Order should not matter, we just want check that all files are created.
96
+ result_names = sorted ([item .name for item in tmpdir_path .iterdir ()])
96
97
97
98
assert result_names == expected_files
98
99
You can’t perform that action at this time.
0 commit comments