1515from ramble .language .language_base import DirectiveError
1616
1717
18- mod_types = [ModifierBase , BasicModifier , SpackModifier ] # noqa: F405 # noqa: F405 # noqa: F405
18+ mod_types = [ModifierBase , BasicModifier ] # noqa: F405
1919
2020func_types = enum .Enum ("func_types" , ["method" , "directive" ])
21+ test_func_types = [func_types .method ]
2122
2223
2324def generate_mod_class (base_class ):
@@ -70,7 +71,7 @@ def add_mode(mod_inst, mode_num=1, func_type=func_types.directive):
7071 return mode_def
7172
7273
73- @pytest .mark .parametrize ("func_type" , func_types )
74+ @pytest .mark .parametrize ("func_type" , test_func_types )
7475@pytest .mark .parametrize ("mod_class" , mod_types )
7576def test_mode_directive (mod_class , func_type ):
7677 test_class = generate_mod_class (mod_class )
@@ -115,7 +116,7 @@ def add_variable_modification(mod_inst, var_mod_num=1, func_type=func_types.dire
115116 return var_mod_def
116117
117118
118- @pytest .mark .parametrize ("func_type" , func_types )
119+ @pytest .mark .parametrize ("func_type" , test_func_types )
119120@pytest .mark .parametrize ("mod_class" , mod_types )
120121def test_variable_modification_directive (mod_class , func_type ):
121122 test_class = generate_mod_class (mod_class )
@@ -145,7 +146,7 @@ def test_variable_modification_directive(mod_class, func_type):
145146 assert test_def [attr ] == mod_inst .variable_modifications [mode_name ][var_name ][attr ]
146147
147148
148- @pytest .mark .parametrize ("func_type" , func_types )
149+ @pytest .mark .parametrize ("func_type" , test_func_types )
149150@pytest .mark .parametrize ("mod_class" , mod_types )
150151def test_variable_modification_invalid_method (mod_class , func_type ):
151152 var_mod_name = "invalid_method_variable"
@@ -169,7 +170,7 @@ def test_variable_modification_invalid_method(mod_class, func_type):
169170 assert "variable_modification directive given an invalid method" in err
170171
171172
172- @pytest .mark .parametrize ("func_type" , func_types )
173+ @pytest .mark .parametrize ("func_type" , test_func_types )
173174@pytest .mark .parametrize ("mod_class" , mod_types )
174175def test_variable_modification_missing_mode (mod_class , func_type ):
175176 var_mod_name = "missing_mode_variable"
@@ -210,7 +211,7 @@ def add_software_spec(mod_inst, spec_num=1, func_type=func_types.directive):
210211 return spec_def
211212
212213
213- @pytest .mark .parametrize ("func_type" , func_types )
214+ @pytest .mark .parametrize ("func_type" , test_func_types )
214215@pytest .mark .parametrize ("mod_class" , mod_types )
215216def test_software_spec_directive (mod_class , func_type ):
216217 test_class = generate_mod_class (mod_class )
@@ -254,7 +255,7 @@ def add_compiler(mod_inst, spec_num=1, func_type=func_types.directive):
254255 return spec_def
255256
256257
257- @pytest .mark .parametrize ("func_type" , func_types )
258+ @pytest .mark .parametrize ("func_type" , test_func_types )
258259@pytest .mark .parametrize ("mod_class" , mod_types )
259260def test_define_compiler_directive (mod_class , func_type ):
260261 test_class = generate_mod_class (mod_class )
@@ -292,7 +293,7 @@ def add_required_package(mod_inst, pkg_num=1, func_type=func_types.directive):
292293 return pkg_def
293294
294295
295- @pytest .mark .parametrize ("func_type" , func_types )
296+ @pytest .mark .parametrize ("func_type" , test_func_types )
296297@pytest .mark .parametrize ("mod_class" , mod_types )
297298def test_required_package_directive (mod_class , func_type ):
298299 test_class = generate_mod_class (mod_class )
@@ -327,7 +328,7 @@ def add_figure_of_merit_context(mod_inst, context_num=1, func_type=func_types.di
327328 return context_def
328329
329330
330- @pytest .mark .parametrize ("func_type" , func_types )
331+ @pytest .mark .parametrize ("func_type" , test_func_types )
331332@pytest .mark .parametrize ("mod_class" , mod_types )
332333def test_figure_of_merit_context_directive (mod_class , func_type ):
333334 test_class = generate_mod_class (mod_class )
@@ -389,7 +390,7 @@ def add_figure_of_merit(mod_inst, context_num=1, func_type=func_types.directive)
389390 return fom_def
390391
391392
392- @pytest .mark .parametrize ("func_type" , func_types )
393+ @pytest .mark .parametrize ("func_type" , test_func_types )
393394@pytest .mark .parametrize ("mod_class" , mod_types )
394395def test_figure_of_merit_directive (mod_class , func_type ):
395396 test_class = generate_mod_class (mod_class )
@@ -423,7 +424,7 @@ def add_archive_pattern(mod_inst, archive_num=1, func_type=func_types.directive)
423424 return pattern
424425
425426
426- @pytest .mark .parametrize ("func_type" , func_types )
427+ @pytest .mark .parametrize ("func_type" , test_func_types )
427428@pytest .mark .parametrize ("mod_class" , mod_types )
428429def test_archive_pattern_directive (mod_class , func_type ):
429430 test_class = generate_mod_class (mod_class )
@@ -453,7 +454,7 @@ def add_executable_modifier(mod_inst, exec_mod_num=1, func_type=func_types.direc
453454 return mod_name
454455
455456
456- @pytest .mark .parametrize ("func_type" , func_types )
457+ @pytest .mark .parametrize ("func_type" , test_func_types )
457458@pytest .mark .parametrize ("mod_class" , mod_types )
458459def test_executable_modifier_directive (mod_class , func_type ):
459460 test_class = generate_mod_class (mod_class )
@@ -488,7 +489,7 @@ def add_env_var_modification(mod_inst, env_var_mod_num=1, func_type=func_types.d
488489 return test_defs
489490
490491
491- @pytest .mark .parametrize ("func_type" , func_types )
492+ @pytest .mark .parametrize ("func_type" , test_func_types )
492493@pytest .mark .parametrize ("mod_class" , mod_types )
493494def test_env_var_modification_directive (mod_class , func_type ):
494495 test_class = generate_mod_class (mod_class )
@@ -538,7 +539,7 @@ def add_modifier_variable(mod_inst, mod_var_num=1, func_type=func_types.directiv
538539 return test_defs
539540
540541
541- @pytest .mark .parametrize ("func_type" , func_types )
542+ @pytest .mark .parametrize ("func_type" , test_func_types )
542543@pytest .mark .parametrize ("mod_class" , mod_types )
543544def test_modifier_variable_directive (mod_class , func_type ):
544545 test_class = generate_mod_class (mod_class )
@@ -558,7 +559,7 @@ def test_modifier_variable_directive(mod_class, func_type):
558559 assert test_def ["default" ] == mod_inst .modifier_variables [mode ][var_name ].default
559560
560561
561- @pytest .mark .parametrize ("func_type" , func_types )
562+ @pytest .mark .parametrize ("func_type" , test_func_types )
562563@pytest .mark .parametrize ("mod_class" , mod_types )
563564def test_modifier_class_attributes (mod_class , func_type ):
564565 test_class = generate_mod_class (mod_class )
0 commit comments