5
5
from sinol_make import configure_parsers
6
6
7
7
8
- @pytest .mark .parametrize ("create_package" , [get_simple_package_path (), get_verify_status_package_path () ], indirect = True )
8
+ @pytest .mark .parametrize ("create_package" , [get_simple_package_path ()], indirect = True )
9
9
def test_simple (create_package , time_tool ):
10
10
"""
11
11
Test a simple run.
@@ -21,7 +21,7 @@ def test_simple(create_package, time_tool):
21
21
command .run (args )
22
22
23
23
24
- @pytest .mark .parametrize ("create_package" , [get_simple_package_path (), get_verify_status_package_path () ], indirect = True )
24
+ @pytest .mark .parametrize ("create_package" , [get_simple_package_path ()], indirect = True )
25
25
def test_no_expected_scores (capsys , create_package , time_tool ):
26
26
"""
27
27
Test with no sinol_expected_scores in config.yml.
@@ -51,7 +51,7 @@ def test_no_expected_scores(capsys, create_package, time_tool):
51
51
assert "abc.cpp" in out
52
52
53
53
54
- @pytest .mark .parametrize ("create_package" , [get_simple_package_path (), get_verify_status_package_path () ], indirect = True )
54
+ @pytest .mark .parametrize ("create_package" , [get_simple_package_path ()], indirect = True )
55
55
def test_apply_suggestions (create_package , time_tool ):
56
56
"""
57
57
Test with no sinol_expected_scores in config.yml.
@@ -143,3 +143,23 @@ def test_flag_solutions(capsys, create_package, time_tool):
143
143
assert "abc1.cpp" in out
144
144
assert "abc2.cpp" in out
145
145
assert "abc3.cpp" not in out
146
+
147
+
148
+ @pytest .mark .parametrize ("create_package" , [get_weak_compilation_flags_package_path ()], indirect = True )
149
+ def test_weak_compilation_flags (create_package ):
150
+ """
151
+ Test flag --weak-compilation-flags.
152
+ """
153
+ parser = configure_parsers ()
154
+ args = parser .parse_args (["run" , "--time_tool" , "time" ])
155
+ command = Command ()
156
+
157
+ with pytest .raises (SystemExit ) as e :
158
+ command .run (args )
159
+
160
+ assert e .type == SystemExit
161
+ assert e .value .code == 1
162
+
163
+ args = parser .parse_args (["run" , "--weak_compilation_flags" , "--time_tool" , "time" ])
164
+ command = Command ()
165
+ command .run (args )
0 commit comments