22from git_autograder import GitAutograderStatus , GitAutograderTestLoader , assert_output
33
44from ..verify import (
5- INIT_NOT_UNDONE ,
5+ INIT_NOT_UNDONE ,
66 TODO_FILE_MISSING ,
77 CONTACTS_FILE_MISSING ,
8- PRIVATE_FOLDER_MISSING ,
9- verify
8+ PRIVATE_FOLDER_MISSING ,
9+ verify ,
1010)
1111
1212REPOSITORY_NAME = "undo-init"
1616
1717def test_base ():
1818 # We patch the ExerciseRepoConfig to return "ignore" instead of "local"
19- with mock .patch ("git_autograder.exercise_config.ExerciseConfig.ExerciseRepoConfig" ) as mock_config :
19+ with mock .patch (
20+ "git_autograder.exercise_config.ExerciseConfig.ExerciseRepoConfig"
21+ ) as mock_config :
2022 # Configure the mock to return "ignore" when the loader accesses it
2123 instance = mock_config .return_value
2224 instance .repo_type = "ignore"
23- instance .repo_name = "repo" # Match the loader's hardcoded name
25+ instance .repo_name = "repo" # Match the loader's hardcoded name
2426 instance .init = False
2527
2628 with loader .load ("specs/base.yml" ) as output :
@@ -33,7 +35,9 @@ def test_init_not_undone():
3335
3436
3537def test_todo_file_missing ():
36- with mock .patch ("git_autograder.exercise_config.ExerciseConfig.ExerciseRepoConfig" ) as mock_config :
38+ with mock .patch (
39+ "git_autograder.exercise_config.ExerciseConfig.ExerciseRepoConfig"
40+ ) as mock_config :
3741 instance = mock_config .return_value
3842 instance .repo_type = "ignore"
3943 instance .repo_name = "repo"
@@ -44,25 +48,32 @@ def test_todo_file_missing():
4448
4549
4650def test_private_dir_missing ():
47- with mock .patch ("git_autograder.exercise_config.ExerciseConfig.ExerciseRepoConfig" ) as mock_config :
51+ with mock .patch (
52+ "git_autograder.exercise_config.ExerciseConfig.ExerciseRepoConfig"
53+ ) as mock_config :
4854 instance = mock_config .return_value
4955 instance .repo_type = "ignore"
5056 instance .repo_name = "repo"
5157 instance .init = False
5258
5359 with loader .load ("specs/private_dir_missing.yml" ) as output :
54- assert_output (output , GitAutograderStatus .UNSUCCESSFUL , [
55- PRIVATE_FOLDER_MISSING ,
56- CONTACTS_FILE_MISSING
57- ])
60+ assert_output (
61+ output ,
62+ GitAutograderStatus .UNSUCCESSFUL ,
63+ [PRIVATE_FOLDER_MISSING , CONTACTS_FILE_MISSING ],
64+ )
5865
5966
6067def test_contacts_file_missing ():
61- with mock .patch ("git_autograder.exercise_config.ExerciseConfig.ExerciseRepoConfig" ) as mock_config :
68+ with mock .patch (
69+ "git_autograder.exercise_config.ExerciseConfig.ExerciseRepoConfig"
70+ ) as mock_config :
6271 instance = mock_config .return_value
6372 instance .repo_type = "ignore"
6473 instance .repo_name = "repo"
6574 instance .init = False
6675
6776 with loader .load ("specs/contacts_file_missing.yml" ) as output :
68- assert_output (output , GitAutograderStatus .UNSUCCESSFUL , [CONTACTS_FILE_MISSING ])
77+ assert_output (
78+ output , GitAutograderStatus .UNSUCCESSFUL , [CONTACTS_FILE_MISSING ]
79+ )
0 commit comments