@@ -27,19 +27,17 @@ def test_cli_help(script_runner):
2727 assert "-V, --version show program's version number and exit" in cli .stdout
2828
2929
30- @mark .parametrize ("command" , ["discordai_modelizer" ])
31- def test_cli_model_list (script_runner , command ):
32- cli = script_runner .run ([command , "model" , "list" ])
30+ def test_cli_model_list (script_runner ):
31+ cli = script_runner .run (["discordai_modelizer" , "model" , "list" ])
3332 assert cli .success
3433 for o in expected_values .list_module_expected :
3534 assert o in loads (cli .stdout )
3635
3736
38- @mark .parametrize ("command" , ["discordai_modelizer" ])
39- def test_cli_training (script_runner , command , default_file_output ):
37+ def test_cli_training (script_runner , default_file_output ):
4038 cli = script_runner .run (
4139 [
42- command ,
40+ "discordai_modelizer" ,
4341 "model" ,
4442 "create" ,
4543 "-c" ,
@@ -56,90 +54,82 @@ def test_cli_training(script_runner, command, default_file_output):
5654 assert "INFO: Starting OpenAI fine-tune job..." in cli .stdout
5755
5856
59- @mark .parametrize ("command" , ["discordai_modelizer" ])
60- def test_cli_model_list_full (script_runner , command ):
61- cli = script_runner .run ([command , "model" , "list" , "--full" ])
57+ def test_cli_model_list_full (script_runner ):
58+ cli = script_runner .run (["discordai_modelizer" , "model" , "list" , "--full" ])
6259 assert cli .success
6360 for o in expected_values .list_module_expected_full :
6461 assert o in loads (cli .stdout )
6562
6663
67- @mark .parametrize ("command" , ["discordai_modelizer" ])
68- def test_cli_delete_model (script_runner , command ):
69- cli = script_runner .run ([command , "model" , "delete" , "-m" , "whisper-1" ])
64+ def test_cli_delete_model (script_runner ):
65+ cli = script_runner .run (
66+ ["discordai_modelizer" , "model" , "delete" , "-m" , "whisper-1" ]
67+ )
7068 assert (
7169 "Are you sure you want to delete this model? This action is not reversable. Y/N: "
7270 in cli .stdout
7371 )
7472
7573
76- @mark .parametrize ("command" , ["discordai_modelizer" ])
77- def test_cli_job_list (script_runner , command ):
78- cli = script_runner .run ([command , "job" , "list" ])
74+ def test_cli_job_list (script_runner ):
75+ cli = script_runner .run (["discordai_modelizer" , "job" , "list" ])
7976 assert cli .success
8077 assert dumps (expected_values .list_job_expected , indent = 4 ) in cli .stdout
8178
8279
83- @mark .parametrize ("command" , ["discordai_modelizer" ])
84- def test_job_list_full (script_runner , command ):
85- cli = script_runner .run ([command , "job" , "list" , "--full" ])
80+ def test_job_list_full (script_runner ):
81+ cli = script_runner .run (["discordai_modelizer" , "job" , "list" , "--full" ])
8682 assert cli .success
8783 assert dumps (expected_values .list_job_expected_full , indent = 4 ) in cli .stdout
8884
8985
90- @mark .parametrize ("command" , ["discordai_modelizer" ])
91- def test_job_info (script_runner , command ):
86+ def test_job_info (script_runner ):
9287 cli = script_runner .run (
93- [command , "job" , "info" , "-j" , "ftjob-i2IyeV2xbLCSrYq45kTKSdwE" ]
88+ ["discordai_modelizer" , "job" , "info" , "-j" , "ftjob-i2IyeV2xbLCSrYq45kTKSdwE" ]
9489 )
9590 assert cli .success
9691 assert dumps (expected_values .job_info_expected , indent = 4 ) in cli .stdout
9792
9893
99- @mark .parametrize ("command" , ["discordai_modelizer" ])
100- def test_job_events (script_runner , command ):
94+ def test_job_events (script_runner ):
10195 cli = script_runner .run (
102- [command , "job" , "events" , "-j" , "ftjob-i2IyeV2xbLCSrYq45kTKSdwE" ]
96+ ["discordai_modelizer" , "job" , "events" , "-j" , "ftjob-i2IyeV2xbLCSrYq45kTKSdwE" ]
10397 )
10498 assert cli .success
10599 assert dumps (expected_values .job_events_expected , indent = 4 ) in cli .stdout
106100
107101
108- @mark .parametrize ("command" , ["discordai_modelizer" ])
109- def test_job_cancel (script_runner , command ):
102+ def test_job_cancel (script_runner ):
110103 cli = script_runner .run (
111- [command , "job" , "cancel" , "-j" , "ftjob-i2IyeV2xbLCSrYq45kTKSdwE" ]
104+ ["discordai_modelizer" , "job" , "cancel" , "-j" , "ftjob-i2IyeV2xbLCSrYq45kTKSdwE" ]
112105 )
113106 assert cli .success
114107 assert dumps (expected_values .job_cancel_expected , indent = 4 ) in cli .stdout
115108
116109
117- @mark .parametrize ("command" , ["discordai_modelizer" ])
118- def test_job_cancel (script_runner , command ):
110+ def test_job_cancel (script_runner ):
119111 cli = script_runner .run (
120- [command , "job" , "cancel" , "-j" , "ftjob-i2IyeV2xbLCSrYq45kTKSdwE" ]
112+ ["discordai_modelizer" , "job" , "cancel" , "-j" , "ftjob-i2IyeV2xbLCSrYq45kTKSdwE" ]
121113 )
122114 assert cli .success
123115 assert dumps (expected_values .job_cancel_expected , indent = 4 ) in cli .stdout
124116
125117
126- @mark .parametrize ("command" , ["discordai_modelizer" ])
127- def test_cli_model_bad_args (script_runner , command ):
118+ def test_cli_model_bad_args (script_runner ):
128119 cli = script_runner .run (
129120 [
130- command ,
121+ "discordai_modelizer" ,
131122 "model" ,
132123 ]
133124 )
134125 assert not cli .success
135126 assert "Must choose a command from `list`, `create`, or `delete`" in cli .stderr
136127
137128
138- @mark .parametrize ("command" , ["discordai_modelizer" ])
139- def test_cli_job_bad_args (script_runner , command ):
129+ def test_cli_job_bad_args (script_runner ):
140130 cli = script_runner .run (
141131 [
142- command ,
132+ "discordai_modelizer" ,
143133 "job" ,
144134 ]
145135 )
0 commit comments