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