@@ -38,15 +38,9 @@ def generic_validation(self):
3838]
3939
4040
41- @pytest .fixture
42- def file_data () -> FileData :
43- return FileData (
44- identifier = "mock file data" ,
45- connector_type = "CON" ,
46- source_identifiers = SourceIdentifiers (filename = "n" , fullpath = "n" ),
47- )
48-
49-
41+ @pytest .mark .parametrize (
42+ "file_data" , mock_file_data , ids = [type (fd ).__name__ for fd in mock_file_data ]
43+ )
5044def test_async_sample_function (file_data ):
5145 from test .assets .async_typed_dict_response import async_sample_function as test_fn
5246
@@ -62,6 +56,9 @@ def test_async_sample_function(file_data):
6256 assert output == {"response" : {"a_out" : 1 , "b_out" : 2 }}
6357
6458
59+ @pytest .mark .parametrize (
60+ "file_data" , mock_file_data , ids = [type (fd ).__name__ for fd in mock_file_data ]
61+ )
6562def test_dataclass_response (file_data ):
6663 from test .assets .dataclass_response import sample_function_with_path as test_fn
6764
@@ -85,6 +82,9 @@ def test_dataclass_response(file_data):
8582 }
8683
8784
85+ @pytest .mark .parametrize (
86+ "file_data" , mock_file_data , ids = [type (fd ).__name__ for fd in mock_file_data ]
87+ )
8888def test_empty_input_and_output (file_data ):
8989 from test .assets .empty_input_and_response import SampleClass as TestClass
9090
@@ -99,6 +99,9 @@ def test_empty_input_and_output(file_data):
9999 assert not output
100100
101101
102+ @pytest .mark .parametrize (
103+ "file_data" , mock_file_data , ids = [type (fd ).__name__ for fd in mock_file_data ]
104+ )
102105def test_filedata_meta (file_data ):
103106 from test .assets .filedata_meta import Input
104107 from test .assets .filedata_meta import process_input as test_fn
0 commit comments