@@ -38,9 +38,15 @@ def generic_validation(self):
38
38
]
39
39
40
40
41
- @pytest .mark .parametrize (
42
- "file_data" , mock_file_data , ids = [type (fd ).__name__ for fd in mock_file_data ]
43
- )
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
+
44
50
def test_async_sample_function (file_data ):
45
51
from test .assets .async_typed_dict_response import async_sample_function as test_fn
46
52
@@ -56,9 +62,6 @@ def test_async_sample_function(file_data):
56
62
assert output == {"response" : {"a_out" : 1 , "b_out" : 2 }}
57
63
58
64
59
- @pytest .mark .parametrize (
60
- "file_data" , mock_file_data , ids = [type (fd ).__name__ for fd in mock_file_data ]
61
- )
62
65
def test_dataclass_response (file_data ):
63
66
from test .assets .dataclass_response import sample_function_with_path as test_fn
64
67
@@ -78,12 +81,10 @@ def test_dataclass_response(file_data):
78
81
"resolved" : str (current_path .resolve ()),
79
82
"b" : "2" ,
80
83
"c" : 1 ,
84
+ "p" : not isinstance (file_data , BatchFileData ),
81
85
}
82
86
83
87
84
- @pytest .mark .parametrize (
85
- "file_data" , mock_file_data , ids = [type (fd ).__name__ for fd in mock_file_data ]
86
- )
87
88
def test_empty_input_and_output (file_data ):
88
89
from test .assets .empty_input_and_response import SampleClass as TestClass
89
90
@@ -98,9 +99,6 @@ def test_empty_input_and_output(file_data):
98
99
assert not output
99
100
100
101
101
- @pytest .mark .parametrize (
102
- "file_data" , mock_file_data , ids = [type (fd ).__name__ for fd in mock_file_data ]
103
- )
104
102
def test_filedata_meta (file_data ):
105
103
from test .assets .filedata_meta import Input
106
104
from test .assets .filedata_meta import process_input as test_fn
0 commit comments