-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* submitの際のコマンド実行を追加 * submit_filenameがない場合はFalseを返すように変更 * test_indent_estimationをaddしわすれていた * コミットするブランチを間違えた * submit.pyを修正 * USER_CONFIG_PATHを読み込んだログを出力するように * exec_on_submitのテストを追加 * テストを追加 * test_exec_on_submitにおいてtemp_dirで実行するように変更
- Loading branch information
Showing
10 changed files
with
167 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class SubmitConfig: | ||
|
||
def __init__(self, | ||
exec_before_submit: str = None, | ||
exec_after_submit: str = None, | ||
submit_filename: str = None | ||
): | ||
self.exec_before_submit = exec_before_submit | ||
self.exec_after_submit = exec_after_submit | ||
self.submit_filename = submit_filename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
tests/resources/test_atcoder_client_mock/exec_on_submit/config.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[submit] | ||
exec_before_submit='bash exec_before_submit.sh' | ||
submit_filename='exec_before_submit_is_completed' | ||
exec_after_submit='bash exec_after_submit.sh' |
1 change: 1 addition & 0 deletions
1
tests/resources/test_atcoder_client_mock/exec_on_submit/exec_after_submit.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
touch exec_after_submit_is_completed |
1 change: 1 addition & 0 deletions
1
tests/resources/test_atcoder_client_mock/exec_on_submit/exec_before_submit.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
echo Kyuuridenamida > exec_before_submit_is_completed |
7 changes: 7 additions & 0 deletions
7
tests/resources/test_atcoder_client_mock/exec_on_submit/main.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include<iostream> | ||
|
||
using namespace std; | ||
|
||
int main(){ | ||
return 0; | ||
} |
16 changes: 16 additions & 0 deletions
16
tests/resources/test_atcoder_client_mock/exec_on_submit/metadata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"code_filename": "main.cpp", | ||
"judge": { | ||
"judge_type": "normal" | ||
}, | ||
"lang": "cpp", | ||
"problem": { | ||
"alphabet": "A", | ||
"contest": { | ||
"contest_id": "abc215" | ||
}, | ||
"problem_id": "abc215_a" | ||
}, | ||
"sample_in_pattern": "in_*.txt", | ||
"sample_out_pattern": "out_*.txt" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters