3131
3232import pandas as pd
3333import pandas .testing
34+ import pytest
3435from pandas .testing import assert_frame_equal
3536from parameterized import parameterized
3637
@@ -77,6 +78,11 @@ def test_read_write_csv(self):
7778 self .assertCountEqual (['a,b,c' , '1,2,3' , '3,4,7' ],
7879 set (self .read_all_lines (output + 'out.csv*' )))
7980
81+ @pytest .mark .uses_pyarrow
82+ def test_read_write_parquet (self ):
83+ self ._run_read_write_test (
84+ 'parquet' , {}, {}, dict (check_index = False ), ['pyarrow' ])
85+
8086 @parameterized .expand ([
8187 ('csv' , dict (index_col = 0 )),
8288 ('csv' , dict (index_col = 0 , splittable = True )),
@@ -100,7 +106,6 @@ def test_read_write_csv(self):
100106 dict (check_index = False )),
101107 ('html' , dict (index_col = 0 ), {}, {}, ['lxml' ]),
102108 ('excel' , dict (index_col = 0 ), {}, {}, ['openpyxl' , 'xlrd' ]),
103- ('parquet' , {}, {}, dict (check_index = False ), ['pyarrow' ]),
104109 ])
105110 # pylint: disable=dangerous-default-value
106111 def test_read_write (
@@ -110,6 +115,18 @@ def test_read_write(
110115 write_kwargs = {},
111116 check_options = {},
112117 requires = ()):
118+ self ._run_read_write_test (
119+ format , read_kwargs , write_kwargs , check_options , requires )
120+
121+ # pylint: disable=dangerous-default-value
122+ def _run_read_write_test (
123+ self ,
124+ format ,
125+ read_kwargs = {},
126+ write_kwargs = {},
127+ check_options = {},
128+ requires = ()):
129+
113130 for module in requires :
114131 try :
115132 importlib .import_module (module )
0 commit comments