@@ -225,11 +225,9 @@ def test_read_dta3(self, file, datapath):
225
225
226
226
tm .assert_frame_equal (parsed , expected )
227
227
228
- @pytest .mark .parametrize (
229
- "file" , ["stata4_111" , "stata4_113" , "stata4_114" , "stata4_115" , "stata4_117" ]
230
- )
231
- def test_read_dta4 (self , file , datapath ):
232
- file = datapath ("io" , "data" , "stata" , f"{ file } .dta" )
228
+ @pytest .mark .parametrize ("version" , [110 , 111 , 113 , 114 , 115 , 117 ])
229
+ def test_read_dta4 (self , version , datapath ):
230
+ file = datapath ("io" , "data" , "stata" , f"stata4_{ version } .dta" )
233
231
parsed = self .read_dta (file )
234
232
235
233
expected = DataFrame .from_records (
@@ -271,11 +269,11 @@ def test_read_dta4(self, file, datapath):
271
269
# stata doesn't save .category metadata
272
270
tm .assert_frame_equal (parsed , expected )
273
271
274
- @pytest .mark .parametrize ("file " , ["stata4_105" , "stata4_108" ])
275
- def test_readold_dta4 (self , file , datapath ):
272
+ @pytest .mark .parametrize ("version " , [105 , 108 ])
273
+ def test_readold_dta4 (self , version , datapath ):
276
274
# This test is the same as test_read_dta4 above except that the columns
277
275
# had to be renamed to match the restrictions in older file format
278
- file = datapath ("io" , "data" , "stata" , f"{ file } .dta" )
276
+ file = datapath ("io" , "data" , "stata" , f"stata4_ { version } .dta" )
279
277
parsed = self .read_dta (file )
280
278
281
279
expected = DataFrame .from_records (
0 commit comments