diff --git a/pandas/plotting/_misc.py b/pandas/plotting/_misc.py index 2f9c7e109f0c0..213ca77466b8f 100644 --- a/pandas/plotting/_misc.py +++ b/pandas/plotting/_misc.py @@ -364,7 +364,7 @@ def parallel_coordinates( -------- >>> from matplotlib import pyplot as plt >>> df = pd.read_csv('https://raw.github.com/pandas-dev/pandas/master' - '/pandas/tests/data/iris.csv') + '/pandas/tests/data/csv/iris.csv') >>> pd.plotting.parallel_coordinates( df, 'Name', color=('#556270', '#4ECDC4', '#C7F464')) diff --git a/pandas/tests/io/data/banklist.csv b/pandas/tests/io/data/csv/banklist.csv similarity index 100% rename from pandas/tests/io/data/banklist.csv rename to pandas/tests/io/data/csv/banklist.csv diff --git a/pandas/tests/io/data/iris.csv b/pandas/tests/io/data/csv/iris.csv similarity index 100% rename from pandas/tests/io/data/iris.csv rename to pandas/tests/io/data/csv/iris.csv diff --git a/pandas/tests/io/data/test1.csv b/pandas/tests/io/data/csv/test1.csv similarity index 100% rename from pandas/tests/io/data/test1.csv rename to pandas/tests/io/data/csv/test1.csv diff --git a/pandas/tests/io/data/test_mmap.csv b/pandas/tests/io/data/csv/test_mmap.csv similarity index 100% rename from pandas/tests/io/data/test_mmap.csv rename to pandas/tests/io/data/csv/test_mmap.csv diff --git a/pandas/tests/io/data/tips.csv b/pandas/tests/io/data/csv/tips.csv similarity index 100% rename from pandas/tests/io/data/tips.csv rename to pandas/tests/io/data/csv/tips.csv diff --git a/pandas/tests/io/data/blank.ods b/pandas/tests/io/data/excel/blank.ods similarity index 100% rename from pandas/tests/io/data/blank.ods rename to pandas/tests/io/data/excel/blank.ods diff --git a/pandas/tests/io/data/blank.xls b/pandas/tests/io/data/excel/blank.xls similarity index 100% rename from pandas/tests/io/data/blank.xls rename to pandas/tests/io/data/excel/blank.xls diff --git a/pandas/tests/io/data/blank.xlsm b/pandas/tests/io/data/excel/blank.xlsm similarity index 100% rename from pandas/tests/io/data/blank.xlsm rename to pandas/tests/io/data/excel/blank.xlsm diff --git a/pandas/tests/io/data/blank.xlsx b/pandas/tests/io/data/excel/blank.xlsx similarity index 100% rename from pandas/tests/io/data/blank.xlsx rename to pandas/tests/io/data/excel/blank.xlsx diff --git a/pandas/tests/io/data/blank_with_header.ods b/pandas/tests/io/data/excel/blank_with_header.ods similarity index 100% rename from pandas/tests/io/data/blank_with_header.ods rename to pandas/tests/io/data/excel/blank_with_header.ods diff --git a/pandas/tests/io/data/blank_with_header.xls b/pandas/tests/io/data/excel/blank_with_header.xls similarity index 100% rename from pandas/tests/io/data/blank_with_header.xls rename to pandas/tests/io/data/excel/blank_with_header.xls diff --git a/pandas/tests/io/data/blank_with_header.xlsm b/pandas/tests/io/data/excel/blank_with_header.xlsm similarity index 100% rename from pandas/tests/io/data/blank_with_header.xlsm rename to pandas/tests/io/data/excel/blank_with_header.xlsm diff --git a/pandas/tests/io/data/blank_with_header.xlsx b/pandas/tests/io/data/excel/blank_with_header.xlsx similarity index 100% rename from pandas/tests/io/data/blank_with_header.xlsx rename to pandas/tests/io/data/excel/blank_with_header.xlsx diff --git a/pandas/tests/io/data/invalid_value_type.ods b/pandas/tests/io/data/excel/invalid_value_type.ods similarity index 100% rename from pandas/tests/io/data/invalid_value_type.ods rename to pandas/tests/io/data/excel/invalid_value_type.ods diff --git a/pandas/tests/io/data/test1.ods b/pandas/tests/io/data/excel/test1.ods similarity index 100% rename from pandas/tests/io/data/test1.ods rename to pandas/tests/io/data/excel/test1.ods diff --git a/pandas/tests/io/data/test1.xls b/pandas/tests/io/data/excel/test1.xls similarity index 100% rename from pandas/tests/io/data/test1.xls rename to pandas/tests/io/data/excel/test1.xls diff --git a/pandas/tests/io/data/test1.xlsm b/pandas/tests/io/data/excel/test1.xlsm similarity index 100% rename from pandas/tests/io/data/test1.xlsm rename to pandas/tests/io/data/excel/test1.xlsm diff --git a/pandas/tests/io/data/test1.xlsx b/pandas/tests/io/data/excel/test1.xlsx similarity index 100% rename from pandas/tests/io/data/test1.xlsx rename to pandas/tests/io/data/excel/test1.xlsx diff --git a/pandas/tests/io/data/test2.ods b/pandas/tests/io/data/excel/test2.ods similarity index 100% rename from pandas/tests/io/data/test2.ods rename to pandas/tests/io/data/excel/test2.ods diff --git a/pandas/tests/io/data/test2.xls b/pandas/tests/io/data/excel/test2.xls similarity index 100% rename from pandas/tests/io/data/test2.xls rename to pandas/tests/io/data/excel/test2.xls diff --git a/pandas/tests/io/data/test2.xlsm b/pandas/tests/io/data/excel/test2.xlsm similarity index 100% rename from pandas/tests/io/data/test2.xlsm rename to pandas/tests/io/data/excel/test2.xlsm diff --git a/pandas/tests/io/data/test2.xlsx b/pandas/tests/io/data/excel/test2.xlsx similarity index 100% rename from pandas/tests/io/data/test2.xlsx rename to pandas/tests/io/data/excel/test2.xlsx diff --git a/pandas/tests/io/data/test3.ods b/pandas/tests/io/data/excel/test3.ods similarity index 100% rename from pandas/tests/io/data/test3.ods rename to pandas/tests/io/data/excel/test3.ods diff --git a/pandas/tests/io/data/test3.xls b/pandas/tests/io/data/excel/test3.xls similarity index 100% rename from pandas/tests/io/data/test3.xls rename to pandas/tests/io/data/excel/test3.xls diff --git a/pandas/tests/io/data/test3.xlsm b/pandas/tests/io/data/excel/test3.xlsm similarity index 100% rename from pandas/tests/io/data/test3.xlsm rename to pandas/tests/io/data/excel/test3.xlsm diff --git a/pandas/tests/io/data/test3.xlsx b/pandas/tests/io/data/excel/test3.xlsx similarity index 100% rename from pandas/tests/io/data/test3.xlsx rename to pandas/tests/io/data/excel/test3.xlsx diff --git a/pandas/tests/io/data/test4.ods b/pandas/tests/io/data/excel/test4.ods similarity index 100% rename from pandas/tests/io/data/test4.ods rename to pandas/tests/io/data/excel/test4.ods diff --git a/pandas/tests/io/data/test4.xls b/pandas/tests/io/data/excel/test4.xls similarity index 100% rename from pandas/tests/io/data/test4.xls rename to pandas/tests/io/data/excel/test4.xls diff --git a/pandas/tests/io/data/test4.xlsm b/pandas/tests/io/data/excel/test4.xlsm similarity index 100% rename from pandas/tests/io/data/test4.xlsm rename to pandas/tests/io/data/excel/test4.xlsm diff --git a/pandas/tests/io/data/test4.xlsx b/pandas/tests/io/data/excel/test4.xlsx similarity index 100% rename from pandas/tests/io/data/test4.xlsx rename to pandas/tests/io/data/excel/test4.xlsx diff --git a/pandas/tests/io/data/test5.ods b/pandas/tests/io/data/excel/test5.ods similarity index 100% rename from pandas/tests/io/data/test5.ods rename to pandas/tests/io/data/excel/test5.ods diff --git a/pandas/tests/io/data/test5.xls b/pandas/tests/io/data/excel/test5.xls similarity index 100% rename from pandas/tests/io/data/test5.xls rename to pandas/tests/io/data/excel/test5.xls diff --git a/pandas/tests/io/data/test5.xlsm b/pandas/tests/io/data/excel/test5.xlsm similarity index 100% rename from pandas/tests/io/data/test5.xlsm rename to pandas/tests/io/data/excel/test5.xlsm diff --git a/pandas/tests/io/data/test5.xlsx b/pandas/tests/io/data/excel/test5.xlsx similarity index 100% rename from pandas/tests/io/data/test5.xlsx rename to pandas/tests/io/data/excel/test5.xlsx diff --git a/pandas/tests/io/data/test_converters.ods b/pandas/tests/io/data/excel/test_converters.ods similarity index 100% rename from pandas/tests/io/data/test_converters.ods rename to pandas/tests/io/data/excel/test_converters.ods diff --git a/pandas/tests/io/data/test_converters.xls b/pandas/tests/io/data/excel/test_converters.xls similarity index 100% rename from pandas/tests/io/data/test_converters.xls rename to pandas/tests/io/data/excel/test_converters.xls diff --git a/pandas/tests/io/data/test_converters.xlsm b/pandas/tests/io/data/excel/test_converters.xlsm similarity index 100% rename from pandas/tests/io/data/test_converters.xlsm rename to pandas/tests/io/data/excel/test_converters.xlsm diff --git a/pandas/tests/io/data/test_converters.xlsx b/pandas/tests/io/data/excel/test_converters.xlsx similarity index 100% rename from pandas/tests/io/data/test_converters.xlsx rename to pandas/tests/io/data/excel/test_converters.xlsx diff --git a/pandas/tests/io/data/test_index_name_pre17.ods b/pandas/tests/io/data/excel/test_index_name_pre17.ods similarity index 100% rename from pandas/tests/io/data/test_index_name_pre17.ods rename to pandas/tests/io/data/excel/test_index_name_pre17.ods diff --git a/pandas/tests/io/data/test_index_name_pre17.xls b/pandas/tests/io/data/excel/test_index_name_pre17.xls similarity index 100% rename from pandas/tests/io/data/test_index_name_pre17.xls rename to pandas/tests/io/data/excel/test_index_name_pre17.xls diff --git a/pandas/tests/io/data/test_index_name_pre17.xlsm b/pandas/tests/io/data/excel/test_index_name_pre17.xlsm similarity index 100% rename from pandas/tests/io/data/test_index_name_pre17.xlsm rename to pandas/tests/io/data/excel/test_index_name_pre17.xlsm diff --git a/pandas/tests/io/data/test_index_name_pre17.xlsx b/pandas/tests/io/data/excel/test_index_name_pre17.xlsx similarity index 100% rename from pandas/tests/io/data/test_index_name_pre17.xlsx rename to pandas/tests/io/data/excel/test_index_name_pre17.xlsx diff --git a/pandas/tests/io/data/test_multisheet.ods b/pandas/tests/io/data/excel/test_multisheet.ods similarity index 100% rename from pandas/tests/io/data/test_multisheet.ods rename to pandas/tests/io/data/excel/test_multisheet.ods diff --git a/pandas/tests/io/data/test_multisheet.xls b/pandas/tests/io/data/excel/test_multisheet.xls similarity index 100% rename from pandas/tests/io/data/test_multisheet.xls rename to pandas/tests/io/data/excel/test_multisheet.xls diff --git a/pandas/tests/io/data/test_multisheet.xlsm b/pandas/tests/io/data/excel/test_multisheet.xlsm similarity index 100% rename from pandas/tests/io/data/test_multisheet.xlsm rename to pandas/tests/io/data/excel/test_multisheet.xlsm diff --git a/pandas/tests/io/data/test_multisheet.xlsx b/pandas/tests/io/data/excel/test_multisheet.xlsx similarity index 100% rename from pandas/tests/io/data/test_multisheet.xlsx rename to pandas/tests/io/data/excel/test_multisheet.xlsx diff --git a/pandas/tests/io/data/test_squeeze.ods b/pandas/tests/io/data/excel/test_squeeze.ods similarity index 100% rename from pandas/tests/io/data/test_squeeze.ods rename to pandas/tests/io/data/excel/test_squeeze.ods diff --git a/pandas/tests/io/data/test_squeeze.xls b/pandas/tests/io/data/excel/test_squeeze.xls similarity index 100% rename from pandas/tests/io/data/test_squeeze.xls rename to pandas/tests/io/data/excel/test_squeeze.xls diff --git a/pandas/tests/io/data/test_squeeze.xlsm b/pandas/tests/io/data/excel/test_squeeze.xlsm similarity index 100% rename from pandas/tests/io/data/test_squeeze.xlsm rename to pandas/tests/io/data/excel/test_squeeze.xlsm diff --git a/pandas/tests/io/data/test_squeeze.xlsx b/pandas/tests/io/data/excel/test_squeeze.xlsx similarity index 100% rename from pandas/tests/io/data/test_squeeze.xlsx rename to pandas/tests/io/data/excel/test_squeeze.xlsx diff --git a/pandas/tests/io/data/test_types.ods b/pandas/tests/io/data/excel/test_types.ods similarity index 100% rename from pandas/tests/io/data/test_types.ods rename to pandas/tests/io/data/excel/test_types.ods diff --git a/pandas/tests/io/data/test_types.xls b/pandas/tests/io/data/excel/test_types.xls similarity index 100% rename from pandas/tests/io/data/test_types.xls rename to pandas/tests/io/data/excel/test_types.xls diff --git a/pandas/tests/io/data/test_types.xlsm b/pandas/tests/io/data/excel/test_types.xlsm similarity index 100% rename from pandas/tests/io/data/test_types.xlsm rename to pandas/tests/io/data/excel/test_types.xlsm diff --git a/pandas/tests/io/data/test_types.xlsx b/pandas/tests/io/data/excel/test_types.xlsx similarity index 100% rename from pandas/tests/io/data/test_types.xlsx rename to pandas/tests/io/data/excel/test_types.xlsx diff --git a/pandas/tests/io/data/testdateoverflow.ods b/pandas/tests/io/data/excel/testdateoverflow.ods similarity index 100% rename from pandas/tests/io/data/testdateoverflow.ods rename to pandas/tests/io/data/excel/testdateoverflow.ods diff --git a/pandas/tests/io/data/testdateoverflow.xls b/pandas/tests/io/data/excel/testdateoverflow.xls similarity index 100% rename from pandas/tests/io/data/testdateoverflow.xls rename to pandas/tests/io/data/excel/testdateoverflow.xls diff --git a/pandas/tests/io/data/testdateoverflow.xlsm b/pandas/tests/io/data/excel/testdateoverflow.xlsm similarity index 100% rename from pandas/tests/io/data/testdateoverflow.xlsm rename to pandas/tests/io/data/excel/testdateoverflow.xlsm diff --git a/pandas/tests/io/data/testdateoverflow.xlsx b/pandas/tests/io/data/excel/testdateoverflow.xlsx similarity index 100% rename from pandas/tests/io/data/testdateoverflow.xlsx rename to pandas/tests/io/data/excel/testdateoverflow.xlsx diff --git a/pandas/tests/io/data/testdtype.ods b/pandas/tests/io/data/excel/testdtype.ods similarity index 100% rename from pandas/tests/io/data/testdtype.ods rename to pandas/tests/io/data/excel/testdtype.ods diff --git a/pandas/tests/io/data/testdtype.xls b/pandas/tests/io/data/excel/testdtype.xls similarity index 100% rename from pandas/tests/io/data/testdtype.xls rename to pandas/tests/io/data/excel/testdtype.xls diff --git a/pandas/tests/io/data/testdtype.xlsm b/pandas/tests/io/data/excel/testdtype.xlsm similarity index 100% rename from pandas/tests/io/data/testdtype.xlsm rename to pandas/tests/io/data/excel/testdtype.xlsm diff --git a/pandas/tests/io/data/testdtype.xlsx b/pandas/tests/io/data/excel/testdtype.xlsx similarity index 100% rename from pandas/tests/io/data/testdtype.xlsx rename to pandas/tests/io/data/excel/testdtype.xlsx diff --git a/pandas/tests/io/data/testmultiindex.ods b/pandas/tests/io/data/excel/testmultiindex.ods similarity index 100% rename from pandas/tests/io/data/testmultiindex.ods rename to pandas/tests/io/data/excel/testmultiindex.ods diff --git a/pandas/tests/io/data/testmultiindex.xls b/pandas/tests/io/data/excel/testmultiindex.xls similarity index 100% rename from pandas/tests/io/data/testmultiindex.xls rename to pandas/tests/io/data/excel/testmultiindex.xls diff --git a/pandas/tests/io/data/testmultiindex.xlsm b/pandas/tests/io/data/excel/testmultiindex.xlsm similarity index 100% rename from pandas/tests/io/data/testmultiindex.xlsm rename to pandas/tests/io/data/excel/testmultiindex.xlsm diff --git a/pandas/tests/io/data/testmultiindex.xlsx b/pandas/tests/io/data/excel/testmultiindex.xlsx similarity index 100% rename from pandas/tests/io/data/testmultiindex.xlsx rename to pandas/tests/io/data/excel/testmultiindex.xlsx diff --git a/pandas/tests/io/data/testskiprows.ods b/pandas/tests/io/data/excel/testskiprows.ods similarity index 100% rename from pandas/tests/io/data/testskiprows.ods rename to pandas/tests/io/data/excel/testskiprows.ods diff --git a/pandas/tests/io/data/testskiprows.xls b/pandas/tests/io/data/excel/testskiprows.xls similarity index 100% rename from pandas/tests/io/data/testskiprows.xls rename to pandas/tests/io/data/excel/testskiprows.xls diff --git a/pandas/tests/io/data/testskiprows.xlsm b/pandas/tests/io/data/excel/testskiprows.xlsm similarity index 100% rename from pandas/tests/io/data/testskiprows.xlsm rename to pandas/tests/io/data/excel/testskiprows.xlsm diff --git a/pandas/tests/io/data/testskiprows.xlsx b/pandas/tests/io/data/excel/testskiprows.xlsx similarity index 100% rename from pandas/tests/io/data/testskiprows.xlsx rename to pandas/tests/io/data/excel/testskiprows.xlsx diff --git a/pandas/tests/io/data/times_1900.ods b/pandas/tests/io/data/excel/times_1900.ods similarity index 100% rename from pandas/tests/io/data/times_1900.ods rename to pandas/tests/io/data/excel/times_1900.ods diff --git a/pandas/tests/io/data/times_1900.xls b/pandas/tests/io/data/excel/times_1900.xls similarity index 100% rename from pandas/tests/io/data/times_1900.xls rename to pandas/tests/io/data/excel/times_1900.xls diff --git a/pandas/tests/io/data/times_1900.xlsm b/pandas/tests/io/data/excel/times_1900.xlsm similarity index 100% rename from pandas/tests/io/data/times_1900.xlsm rename to pandas/tests/io/data/excel/times_1900.xlsm diff --git a/pandas/tests/io/data/times_1900.xlsx b/pandas/tests/io/data/excel/times_1900.xlsx similarity index 100% rename from pandas/tests/io/data/times_1900.xlsx rename to pandas/tests/io/data/excel/times_1900.xlsx diff --git a/pandas/tests/io/data/times_1904.ods b/pandas/tests/io/data/excel/times_1904.ods similarity index 100% rename from pandas/tests/io/data/times_1904.ods rename to pandas/tests/io/data/excel/times_1904.ods diff --git a/pandas/tests/io/data/times_1904.xls b/pandas/tests/io/data/excel/times_1904.xls similarity index 100% rename from pandas/tests/io/data/times_1904.xls rename to pandas/tests/io/data/excel/times_1904.xls diff --git a/pandas/tests/io/data/times_1904.xlsm b/pandas/tests/io/data/excel/times_1904.xlsm similarity index 100% rename from pandas/tests/io/data/times_1904.xlsm rename to pandas/tests/io/data/excel/times_1904.xlsm diff --git a/pandas/tests/io/data/times_1904.xlsx b/pandas/tests/io/data/excel/times_1904.xlsx similarity index 100% rename from pandas/tests/io/data/times_1904.xlsx rename to pandas/tests/io/data/excel/times_1904.xlsx diff --git a/pandas/tests/io/data/writertable.odt b/pandas/tests/io/data/excel/writertable.odt similarity index 100% rename from pandas/tests/io/data/writertable.odt rename to pandas/tests/io/data/excel/writertable.odt diff --git a/pandas/tests/io/data/feather-0_3_1.feather b/pandas/tests/io/data/feather/feather-0_3_1.feather similarity index 100% rename from pandas/tests/io/data/feather-0_3_1.feather rename to pandas/tests/io/data/feather/feather-0_3_1.feather diff --git a/pandas/tests/io/data/fixed_width_format.txt b/pandas/tests/io/data/fixed_width/fixed_width_format.txt similarity index 100% rename from pandas/tests/io/data/fixed_width_format.txt rename to pandas/tests/io/data/fixed_width/fixed_width_format.txt diff --git a/pandas/tests/io/data/banklist.html b/pandas/tests/io/data/html/banklist.html similarity index 100% rename from pandas/tests/io/data/banklist.html rename to pandas/tests/io/data/html/banklist.html diff --git a/pandas/tests/io/data/computer_sales_page.html b/pandas/tests/io/data/html/computer_sales_page.html similarity index 100% rename from pandas/tests/io/data/computer_sales_page.html rename to pandas/tests/io/data/html/computer_sales_page.html diff --git a/pandas/tests/io/data/macau.html b/pandas/tests/io/data/html/macau.html similarity index 100% rename from pandas/tests/io/data/macau.html rename to pandas/tests/io/data/html/macau.html diff --git a/pandas/tests/io/data/nyse_wsj.html b/pandas/tests/io/data/html/nyse_wsj.html similarity index 100% rename from pandas/tests/io/data/nyse_wsj.html rename to pandas/tests/io/data/html/nyse_wsj.html diff --git a/pandas/tests/io/data/spam.html b/pandas/tests/io/data/html/spam.html similarity index 100% rename from pandas/tests/io/data/spam.html rename to pandas/tests/io/data/html/spam.html diff --git a/pandas/tests/io/data/valid_markup.html b/pandas/tests/io/data/html/valid_markup.html similarity index 100% rename from pandas/tests/io/data/valid_markup.html rename to pandas/tests/io/data/html/valid_markup.html diff --git a/pandas/tests/io/data/wikipedia_states.html b/pandas/tests/io/data/html/wikipedia_states.html similarity index 100% rename from pandas/tests/io/data/wikipedia_states.html rename to pandas/tests/io/data/html/wikipedia_states.html diff --git a/pandas/tests/io/data/categorical.0.25.0.pickle b/pandas/tests/io/data/pickle/categorical.0.25.0.pickle similarity index 100% rename from pandas/tests/io/data/categorical.0.25.0.pickle rename to pandas/tests/io/data/pickle/categorical.0.25.0.pickle diff --git a/pandas/tests/io/data/sparseframe-0.20.3.pickle.gz b/pandas/tests/io/data/pickle/sparseframe-0.20.3.pickle.gz similarity index 100% rename from pandas/tests/io/data/sparseframe-0.20.3.pickle.gz rename to pandas/tests/io/data/pickle/sparseframe-0.20.3.pickle.gz diff --git a/pandas/tests/io/data/sparseseries-0.20.3.pickle.gz b/pandas/tests/io/data/pickle/sparseseries-0.20.3.pickle.gz similarity index 100% rename from pandas/tests/io/data/sparseseries-0.20.3.pickle.gz rename to pandas/tests/io/data/pickle/sparseseries-0.20.3.pickle.gz diff --git a/pandas/tests/io/data/test_py27.pkl b/pandas/tests/io/data/pickle/test_py27.pkl similarity index 100% rename from pandas/tests/io/data/test_py27.pkl rename to pandas/tests/io/data/pickle/test_py27.pkl diff --git a/pandas/tests/io/data/labelled-num-na.sav b/pandas/tests/io/data/spss/labelled-num-na.sav similarity index 100% rename from pandas/tests/io/data/labelled-num-na.sav rename to pandas/tests/io/data/spss/labelled-num-na.sav diff --git a/pandas/tests/io/data/labelled-num.sav b/pandas/tests/io/data/spss/labelled-num.sav similarity index 100% rename from pandas/tests/io/data/labelled-num.sav rename to pandas/tests/io/data/spss/labelled-num.sav diff --git a/pandas/tests/io/data/labelled-str.sav b/pandas/tests/io/data/spss/labelled-str.sav similarity index 100% rename from pandas/tests/io/data/labelled-str.sav rename to pandas/tests/io/data/spss/labelled-str.sav diff --git a/pandas/tests/io/data/umlauts.sav b/pandas/tests/io/data/spss/umlauts.sav similarity index 100% rename from pandas/tests/io/data/umlauts.sav rename to pandas/tests/io/data/spss/umlauts.sav diff --git a/pandas/tests/io/data/S4_EDUC1.dta b/pandas/tests/io/data/stata/S4_EDUC1.dta similarity index 100% rename from pandas/tests/io/data/S4_EDUC1.dta rename to pandas/tests/io/data/stata/S4_EDUC1.dta diff --git a/pandas/tests/io/data/stata10_115.dta b/pandas/tests/io/data/stata/stata10_115.dta similarity index 100% rename from pandas/tests/io/data/stata10_115.dta rename to pandas/tests/io/data/stata/stata10_115.dta diff --git a/pandas/tests/io/data/stata10_117.dta b/pandas/tests/io/data/stata/stata10_117.dta similarity index 100% rename from pandas/tests/io/data/stata10_117.dta rename to pandas/tests/io/data/stata/stata10_117.dta diff --git a/pandas/tests/io/data/stata11_115.dta b/pandas/tests/io/data/stata/stata11_115.dta similarity index 100% rename from pandas/tests/io/data/stata11_115.dta rename to pandas/tests/io/data/stata/stata11_115.dta diff --git a/pandas/tests/io/data/stata11_117.dta b/pandas/tests/io/data/stata/stata11_117.dta similarity index 100% rename from pandas/tests/io/data/stata11_117.dta rename to pandas/tests/io/data/stata/stata11_117.dta diff --git a/pandas/tests/io/data/stata12_117.dta b/pandas/tests/io/data/stata/stata12_117.dta similarity index 100% rename from pandas/tests/io/data/stata12_117.dta rename to pandas/tests/io/data/stata/stata12_117.dta diff --git a/pandas/tests/io/data/stata13_dates.dta b/pandas/tests/io/data/stata/stata13_dates.dta similarity index 100% rename from pandas/tests/io/data/stata13_dates.dta rename to pandas/tests/io/data/stata/stata13_dates.dta diff --git a/pandas/tests/io/data/stata14_118.dta b/pandas/tests/io/data/stata/stata14_118.dta similarity index 100% rename from pandas/tests/io/data/stata14_118.dta rename to pandas/tests/io/data/stata/stata14_118.dta diff --git a/pandas/tests/io/data/stata15.dta b/pandas/tests/io/data/stata/stata15.dta similarity index 100% rename from pandas/tests/io/data/stata15.dta rename to pandas/tests/io/data/stata/stata15.dta diff --git a/pandas/tests/io/data/stata16_118.dta b/pandas/tests/io/data/stata/stata16_118.dta similarity index 100% rename from pandas/tests/io/data/stata16_118.dta rename to pandas/tests/io/data/stata/stata16_118.dta diff --git a/pandas/tests/io/data/stata1_114.dta b/pandas/tests/io/data/stata/stata1_114.dta similarity index 100% rename from pandas/tests/io/data/stata1_114.dta rename to pandas/tests/io/data/stata/stata1_114.dta diff --git a/pandas/tests/io/data/stata1_117.dta b/pandas/tests/io/data/stata/stata1_117.dta similarity index 100% rename from pandas/tests/io/data/stata1_117.dta rename to pandas/tests/io/data/stata/stata1_117.dta diff --git a/pandas/tests/io/data/stata1_119.dta.gz b/pandas/tests/io/data/stata/stata1_119.dta.gz similarity index 100% rename from pandas/tests/io/data/stata1_119.dta.gz rename to pandas/tests/io/data/stata/stata1_119.dta.gz diff --git a/pandas/tests/io/data/stata1_encoding.dta b/pandas/tests/io/data/stata/stata1_encoding.dta similarity index 100% rename from pandas/tests/io/data/stata1_encoding.dta rename to pandas/tests/io/data/stata/stata1_encoding.dta diff --git a/pandas/tests/io/data/stata1_encoding_118.dta b/pandas/tests/io/data/stata/stata1_encoding_118.dta similarity index 100% rename from pandas/tests/io/data/stata1_encoding_118.dta rename to pandas/tests/io/data/stata/stata1_encoding_118.dta diff --git a/pandas/tests/io/data/stata2_113.dta b/pandas/tests/io/data/stata/stata2_113.dta similarity index 100% rename from pandas/tests/io/data/stata2_113.dta rename to pandas/tests/io/data/stata/stata2_113.dta diff --git a/pandas/tests/io/data/stata2_114.dta b/pandas/tests/io/data/stata/stata2_114.dta similarity index 100% rename from pandas/tests/io/data/stata2_114.dta rename to pandas/tests/io/data/stata/stata2_114.dta diff --git a/pandas/tests/io/data/stata2_115.dta b/pandas/tests/io/data/stata/stata2_115.dta similarity index 100% rename from pandas/tests/io/data/stata2_115.dta rename to pandas/tests/io/data/stata/stata2_115.dta diff --git a/pandas/tests/io/data/stata2_117.dta b/pandas/tests/io/data/stata/stata2_117.dta similarity index 100% rename from pandas/tests/io/data/stata2_117.dta rename to pandas/tests/io/data/stata/stata2_117.dta diff --git a/pandas/tests/io/data/stata3.csv b/pandas/tests/io/data/stata/stata3.csv similarity index 100% rename from pandas/tests/io/data/stata3.csv rename to pandas/tests/io/data/stata/stata3.csv diff --git a/pandas/tests/io/data/stata3_113.dta b/pandas/tests/io/data/stata/stata3_113.dta similarity index 100% rename from pandas/tests/io/data/stata3_113.dta rename to pandas/tests/io/data/stata/stata3_113.dta diff --git a/pandas/tests/io/data/stata3_114.dta b/pandas/tests/io/data/stata/stata3_114.dta similarity index 100% rename from pandas/tests/io/data/stata3_114.dta rename to pandas/tests/io/data/stata/stata3_114.dta diff --git a/pandas/tests/io/data/stata3_115.dta b/pandas/tests/io/data/stata/stata3_115.dta similarity index 100% rename from pandas/tests/io/data/stata3_115.dta rename to pandas/tests/io/data/stata/stata3_115.dta diff --git a/pandas/tests/io/data/stata3_117.dta b/pandas/tests/io/data/stata/stata3_117.dta similarity index 100% rename from pandas/tests/io/data/stata3_117.dta rename to pandas/tests/io/data/stata/stata3_117.dta diff --git a/pandas/tests/io/data/stata4_113.dta b/pandas/tests/io/data/stata/stata4_113.dta similarity index 100% rename from pandas/tests/io/data/stata4_113.dta rename to pandas/tests/io/data/stata/stata4_113.dta diff --git a/pandas/tests/io/data/stata4_114.dta b/pandas/tests/io/data/stata/stata4_114.dta similarity index 100% rename from pandas/tests/io/data/stata4_114.dta rename to pandas/tests/io/data/stata/stata4_114.dta diff --git a/pandas/tests/io/data/stata4_115.dta b/pandas/tests/io/data/stata/stata4_115.dta similarity index 100% rename from pandas/tests/io/data/stata4_115.dta rename to pandas/tests/io/data/stata/stata4_115.dta diff --git a/pandas/tests/io/data/stata4_117.dta b/pandas/tests/io/data/stata/stata4_117.dta similarity index 100% rename from pandas/tests/io/data/stata4_117.dta rename to pandas/tests/io/data/stata/stata4_117.dta diff --git a/pandas/tests/io/data/stata5.csv b/pandas/tests/io/data/stata/stata5.csv similarity index 100% rename from pandas/tests/io/data/stata5.csv rename to pandas/tests/io/data/stata/stata5.csv diff --git a/pandas/tests/io/data/stata5_113.dta b/pandas/tests/io/data/stata/stata5_113.dta similarity index 100% rename from pandas/tests/io/data/stata5_113.dta rename to pandas/tests/io/data/stata/stata5_113.dta diff --git a/pandas/tests/io/data/stata5_114.dta b/pandas/tests/io/data/stata/stata5_114.dta similarity index 100% rename from pandas/tests/io/data/stata5_114.dta rename to pandas/tests/io/data/stata/stata5_114.dta diff --git a/pandas/tests/io/data/stata5_115.dta b/pandas/tests/io/data/stata/stata5_115.dta similarity index 100% rename from pandas/tests/io/data/stata5_115.dta rename to pandas/tests/io/data/stata/stata5_115.dta diff --git a/pandas/tests/io/data/stata5_117.dta b/pandas/tests/io/data/stata/stata5_117.dta similarity index 100% rename from pandas/tests/io/data/stata5_117.dta rename to pandas/tests/io/data/stata/stata5_117.dta diff --git a/pandas/tests/io/data/stata6.csv b/pandas/tests/io/data/stata/stata6.csv similarity index 100% rename from pandas/tests/io/data/stata6.csv rename to pandas/tests/io/data/stata/stata6.csv diff --git a/pandas/tests/io/data/stata6_113.dta b/pandas/tests/io/data/stata/stata6_113.dta similarity index 100% rename from pandas/tests/io/data/stata6_113.dta rename to pandas/tests/io/data/stata/stata6_113.dta diff --git a/pandas/tests/io/data/stata6_114.dta b/pandas/tests/io/data/stata/stata6_114.dta similarity index 100% rename from pandas/tests/io/data/stata6_114.dta rename to pandas/tests/io/data/stata/stata6_114.dta diff --git a/pandas/tests/io/data/stata6_115.dta b/pandas/tests/io/data/stata/stata6_115.dta similarity index 100% rename from pandas/tests/io/data/stata6_115.dta rename to pandas/tests/io/data/stata/stata6_115.dta diff --git a/pandas/tests/io/data/stata6_117.dta b/pandas/tests/io/data/stata/stata6_117.dta similarity index 100% rename from pandas/tests/io/data/stata6_117.dta rename to pandas/tests/io/data/stata/stata6_117.dta diff --git a/pandas/tests/io/data/stata7_111.dta b/pandas/tests/io/data/stata/stata7_111.dta similarity index 100% rename from pandas/tests/io/data/stata7_111.dta rename to pandas/tests/io/data/stata/stata7_111.dta diff --git a/pandas/tests/io/data/stata7_115.dta b/pandas/tests/io/data/stata/stata7_115.dta similarity index 100% rename from pandas/tests/io/data/stata7_115.dta rename to pandas/tests/io/data/stata/stata7_115.dta diff --git a/pandas/tests/io/data/stata7_117.dta b/pandas/tests/io/data/stata/stata7_117.dta similarity index 100% rename from pandas/tests/io/data/stata7_117.dta rename to pandas/tests/io/data/stata/stata7_117.dta diff --git a/pandas/tests/io/data/stata8_113.dta b/pandas/tests/io/data/stata/stata8_113.dta similarity index 100% rename from pandas/tests/io/data/stata8_113.dta rename to pandas/tests/io/data/stata/stata8_113.dta diff --git a/pandas/tests/io/data/stata8_115.dta b/pandas/tests/io/data/stata/stata8_115.dta similarity index 100% rename from pandas/tests/io/data/stata8_115.dta rename to pandas/tests/io/data/stata/stata8_115.dta diff --git a/pandas/tests/io/data/stata8_117.dta b/pandas/tests/io/data/stata/stata8_117.dta similarity index 100% rename from pandas/tests/io/data/stata8_117.dta rename to pandas/tests/io/data/stata/stata8_117.dta diff --git a/pandas/tests/io/data/stata9_115.dta b/pandas/tests/io/data/stata/stata9_115.dta similarity index 100% rename from pandas/tests/io/data/stata9_115.dta rename to pandas/tests/io/data/stata/stata9_115.dta diff --git a/pandas/tests/io/data/stata9_117.dta b/pandas/tests/io/data/stata/stata9_117.dta similarity index 100% rename from pandas/tests/io/data/stata9_117.dta rename to pandas/tests/io/data/stata/stata9_117.dta diff --git a/pandas/tests/io/excel/conftest.py b/pandas/tests/io/excel/conftest.py index 843b3c08421b3..6ec2f477a442d 100644 --- a/pandas/tests/io/excel/conftest.py +++ b/pandas/tests/io/excel/conftest.py @@ -24,11 +24,12 @@ def merge_cells(request): @pytest.fixture -def df_ref(): +def df_ref(datapath): """ Obtain the reference data from read_csv with the Python engine. """ - df_ref = read_csv("test1.csv", index_col=0, parse_dates=True, engine="python") + filepath = datapath("io", "data", "csv", "test1.csv") + df_ref = read_csv(filepath, index_col=0, parse_dates=True, engine="python") return df_ref diff --git a/pandas/tests/io/excel/test_odf.py b/pandas/tests/io/excel/test_odf.py index 47e610562a388..6e5610f4f5838 100644 --- a/pandas/tests/io/excel/test_odf.py +++ b/pandas/tests/io/excel/test_odf.py @@ -13,7 +13,7 @@ def cd_and_set_engine(monkeypatch, datapath): func = functools.partial(pd.read_excel, engine="odf") monkeypatch.setattr(pd, "read_excel", func) - monkeypatch.chdir(datapath("io", "data")) + monkeypatch.chdir(datapath("io", "data", "excel")) def test_read_invalid_types_raises(): diff --git a/pandas/tests/io/excel/test_readers.py b/pandas/tests/io/excel/test_readers.py index 1d3653f685e1e..8c3b9a07641f7 100644 --- a/pandas/tests/io/excel/test_readers.py +++ b/pandas/tests/io/excel/test_readers.py @@ -81,7 +81,7 @@ def cd_and_set_engine(self, engine, datapath, monkeypatch, read_ext): pytest.skip() func = partial(pd.read_excel, engine=engine) - monkeypatch.chdir(datapath("io", "data")) + monkeypatch.chdir(datapath("io", "data", "excel")) monkeypatch.setattr(pd, "read_excel", func) def test_usecols_int(self, read_ext, df_ref): @@ -502,9 +502,11 @@ def test_read_from_http_url(self, read_ext): if read_ext == ".ods": # TODO: remove once on master pytest.skip() + # TODO: alimcmaster1 - revert to master url = ( - "https://raw.github.com/pandas-dev/pandas/master/" - "pandas/tests/io/data/test1" + read_ext + "https://raw.githubusercontent.com/alimcmaster1" + "/pandas/mcmali-tests-dir-struct/" + "pandas/tests/io/data/excel/test1" + read_ext ) url_table = pd.read_excel(url) local_table = pd.read_excel("test1" + read_ext) @@ -527,7 +529,7 @@ def test_read_from_s3_url(self, read_ext, s3_resource): def test_read_from_file_url(self, read_ext, datapath): # FILE - localtable = os.path.join(datapath("io", "data"), "test1" + read_ext) + localtable = os.path.join(datapath("io", "data", "excel"), "test1" + read_ext) local_table = pd.read_excel(localtable) try: @@ -828,7 +830,7 @@ def cd_and_set_engine(self, engine, datapath, monkeypatch, read_ext): pytest.skip() func = partial(pd.ExcelFile, engine=engine) - monkeypatch.chdir(datapath("io", "data")) + monkeypatch.chdir(datapath("io", "data", "excel")) monkeypatch.setattr(pd, "ExcelFile", func) def test_excel_passes_na(self, read_ext): diff --git a/pandas/tests/io/excel/test_xlrd.py b/pandas/tests/io/excel/test_xlrd.py index fc36be9e1b738..e04dfc97d4968 100644 --- a/pandas/tests/io/excel/test_xlrd.py +++ b/pandas/tests/io/excel/test_xlrd.py @@ -35,7 +35,7 @@ def test_read_xlrd_book(read_ext, frame): # TODO: test for openpyxl as well def test_excel_table_sheet_by_index(datapath, read_ext): - path = datapath("io", "data", "test1{}".format(read_ext)) + path = datapath("io", "data", "excel", "test1{}".format(read_ext)) with pd.ExcelFile(path) as excel: with pytest.raises(xlrd.XLRDError): pd.read_excel(excel, "asdf") diff --git a/pandas/tests/io/test_common.py b/pandas/tests/io/test_common.py index 655fd9d01c1c0..2af370a696860 100644 --- a/pandas/tests/io/test_common.py +++ b/pandas/tests/io/test_common.py @@ -208,21 +208,33 @@ def test_read_expands_user_home_dir( @pytest.mark.parametrize( "reader, module, path", [ - (pd.read_csv, "os", ("io", "data", "iris.csv")), - (pd.read_table, "os", ("io", "data", "iris.csv")), - (pd.read_fwf, "os", ("io", "data", "fixed_width_format.txt")), - (pd.read_excel, "xlrd", ("io", "data", "test1.xlsx")), - (pd.read_feather, "feather", ("io", "data", "feather-0_3_1.feather")), + (pd.read_csv, "os", ("data", "iris.csv")), + (pd.read_table, "os", ("data", "iris.csv")), + ( + pd.read_fwf, + "os", + ("io", "data", "fixed_width", "fixed_width_format.txt"), + ), + (pd.read_excel, "xlrd", ("io", "data", "excel", "test1.xlsx")), + ( + pd.read_feather, + "feather", + ("io", "data", "feather", "feather-0_3_1.feather"), + ), ( pd.read_hdf, "tables", ("io", "data", "legacy_hdf", "datetimetz_object.h5"), ), - (pd.read_stata, "os", ("io", "data", "stata10_115.dta")), + (pd.read_stata, "os", ("io", "data", "stata", "stata10_115.dta")), (pd.read_sas, "os", ("io", "sas", "data", "test1.sas7bdat")), (pd.read_json, "os", ("io", "json", "data", "tsframe_v012.json")), (pd.read_msgpack, "os", ("io", "msgpack", "data", "frame.mp")), - (pd.read_pickle, "os", ("io", "data", "categorical.0.25.0.pickle")), + ( + pd.read_pickle, + "os", + ("io", "data", "pickle", "categorical.0.25.0.pickle"), + ), ], ) def test_read_fspath_all(self, reader, module, path, datapath): @@ -296,7 +308,7 @@ def test_write_fspath_hdf5(self): @pytest.fixture def mmap_file(datapath): - return datapath("io", "data", "test_mmap.csv") + return datapath("io", "data", "csv", "test_mmap.csv") class TestMMapWrapper: diff --git a/pandas/tests/io/test_html.py b/pandas/tests/io/test_html.py index 3d855a12d5481..1cd6740ab831a 100644 --- a/pandas/tests/io/test_html.py +++ b/pandas/tests/io/test_html.py @@ -63,7 +63,7 @@ def test_bs4_version_fails(monkeypatch, datapath): monkeypatch.setattr(bs4, "__version__", "4.2") with pytest.raises(ImportError, match="Pandas requires version"): - read_html(datapath("io", "data", "spam.html"), flavor="bs4") + read_html(datapath("io", "data", "html", "spam.html"), flavor="bs4") def test_invalid_flavor(): @@ -78,7 +78,7 @@ def test_invalid_flavor(): @td.skip_if_no("bs4") @td.skip_if_no("lxml") def test_same_ordering(datapath): - filename = datapath("io", "data", "valid_markup.html") + filename = datapath("io", "data", "html", "valid_markup.html") dfs_lxml = read_html(filename, index_col=0, flavor=["lxml"]) dfs_bs4 = read_html(filename, index_col=0, flavor=["bs4"]) assert_framelist_equal(dfs_lxml, dfs_bs4) @@ -95,10 +95,10 @@ def test_same_ordering(datapath): class TestReadHtml: @pytest.fixture(autouse=True) def set_files(self, datapath): - self.spam_data = datapath("io", "data", "spam.html") + self.spam_data = datapath("io", "data", "html", "spam.html") self.spam_data_kwargs = {} self.spam_data_kwargs["encoding"] = "UTF-8" - self.banklist_data = datapath("io", "data", "banklist.html") + self.banklist_data = datapath("io", "data", "html", "banklist.html") @pytest.fixture(autouse=True, scope="function") def set_defaults(self, flavor, request): @@ -133,9 +133,11 @@ def test_banklist_url(self): @tm.network def test_spam_url(self): + # TODO: alimcmaster1 - revert to master url = ( - "https://raw.githubusercontent.com/pandas-dev/pandas/master/" - "pandas/tests/io/data/spam.html" + "https://raw.githubusercontent.com/alimcmaster1/" + "pandas/mcmali-tests-dir-struct/" + "pandas/tests/io/data/html/spam.html" ) df1 = self.read_html(url, ".*Water.*") df2 = self.read_html(url, "Unit") @@ -376,7 +378,7 @@ def test_python_docs_table(self): @pytest.mark.slow def test_thousands_macau_stats(self, datapath): all_non_nan_table_index = -2 - macau_data = datapath("io", "data", "macau.html") + macau_data = datapath("io", "data", "html", "macau.html") dfs = self.read_html(macau_data, index_col=0, attrs={"class": "style1"}) df = dfs[all_non_nan_table_index] @@ -385,7 +387,7 @@ def test_thousands_macau_stats(self, datapath): @pytest.mark.slow def test_thousands_macau_index_col(self, datapath): all_non_nan_table_index = -2 - macau_data = datapath("io", "data", "macau.html") + macau_data = datapath("io", "data", "html", "macau.html") dfs = self.read_html(macau_data, index_col=0, header=0) df = dfs[all_non_nan_table_index] @@ -566,7 +568,7 @@ def test_parse_header_of_non_string_column(self): tm.assert_frame_equal(result, expected) def test_nyse_wsj_commas_table(self, datapath): - data = datapath("io", "data", "nyse_wsj.html") + data = datapath("io", "data", "html", "nyse_wsj.html") df = self.read_html(data, index_col=0, header=0, attrs={"class": "mdcTable"})[0] expected = Index( @@ -594,7 +596,7 @@ def try_remove_ws(x): df = self.read_html(self.banklist_data, "Metcalf", attrs={"id": "table"})[0] ground_truth = read_csv( - datapath("io", "data", "banklist.csv"), + datapath("io", "data", "csv", "banklist.csv"), converters={"Updated Date": Timestamp, "Closing Date": Timestamp}, ) assert df.shape == ground_truth.shape @@ -889,7 +891,7 @@ def test_parse_dates_combine(self): tm.assert_frame_equal(newdf, res[0]) def test_computer_sales_page(self, datapath): - data = datapath("io", "data", "computer_sales_page.html") + data = datapath("io", "data", "html", "computer_sales_page.html") msg = ( r"Passed header=\[0,1\] are too many " r"rows for this multi_index of columns" @@ -897,11 +899,11 @@ def test_computer_sales_page(self, datapath): with pytest.raises(ParserError, match=msg): self.read_html(data, header=[0, 1]) - data = datapath("io", "data", "computer_sales_page.html") + data = datapath("io", "data", "html", "computer_sales_page.html") assert self.read_html(data, header=[1, 2]) def test_wikipedia_states_table(self, datapath): - data = datapath("io", "data", "wikipedia_states.html") + data = datapath("io", "data", "html", "wikipedia_states.html") assert os.path.isfile(data), "{data!r} is not a file".format(data=data) assert os.path.getsize(data), "{data!r} is an empty file".format(data=data) result = self.read_html(data, "Arizona", header=1)[0] @@ -1095,14 +1097,14 @@ def test_multiple_header_rows(self): tm.assert_frame_equal(expected_df, html_df) def test_works_on_valid_markup(self, datapath): - filename = datapath("io", "data", "valid_markup.html") + filename = datapath("io", "data", "html", "valid_markup.html") dfs = self.read_html(filename, index_col=0) assert isinstance(dfs, list) assert isinstance(dfs[0], DataFrame) @pytest.mark.slow def test_fallback_success(self, datapath): - banklist_data = datapath("io", "data", "banklist.html") + banklist_data = datapath("io", "data", "html", "banklist.html") self.read_html(banklist_data, ".*Water.*", flavor=["lxml", "html5lib"]) def test_to_html_timestamp(self): @@ -1240,7 +1242,7 @@ def run(self): # force import check by reinitalising global vars in html.py reload(pandas.io.html) - filename = datapath("io", "data", "valid_markup.html") + filename = datapath("io", "data", "html", "valid_markup.html") helper_thread1 = ErrorThread(target=self.read_html, args=(filename,)) helper_thread2 = ErrorThread(target=self.read_html, args=(filename,)) diff --git a/pandas/tests/io/test_pickle.py b/pandas/tests/io/test_pickle.py index 23a16c885687f..3be966edef080 100644 --- a/pandas/tests/io/test_pickle.py +++ b/pandas/tests/io/test_pickle.py @@ -202,23 +202,25 @@ def test_legacy_sparse_warning(datapath): Generated with >>> df = pd.DataFrame({"A": [1, 2, 3, 4], "B": [0, 0, 1, 1]}).to_sparse() - >>> df.to_pickle("pandas/tests/io/data/sparseframe-0.20.3.pickle.gz", + >>> df.to_pickle("pandas/tests/io/data/pickle/sparseframe-0.20.3.pickle.gz", ... compression="gzip") >>> s = df['B'] - >>> s.to_pickle("pandas/tests/io/data/sparseseries-0.20.3.pickle.gz", + >>> s.to_pickle("pandas/tests/io/data/pickle/sparseseries-0.20.3.pickle.gz", ... compression="gzip") """ with tm.assert_produces_warning(FutureWarning): simplefilter("ignore", DeprecationWarning) # from boto pd.read_pickle( - datapath("io", "data", "sparseseries-0.20.3.pickle.gz"), compression="gzip" + datapath("io", "data", "pickle", "sparseseries-0.20.3.pickle.gz"), + compression="gzip", ) with tm.assert_produces_warning(FutureWarning): simplefilter("ignore", DeprecationWarning) # from boto pd.read_pickle( - datapath("io", "data", "sparseframe-0.20.3.pickle.gz"), compression="gzip" + datapath("io", "data", "pickle", "sparseframe-0.20.3.pickle.gz"), + compression="gzip", ) @@ -382,7 +384,7 @@ def test_read(self, protocol, get_random_path): def test_unicode_decode_error(): # pickle file written with py27, should be readable without raising # UnicodeDecodeError, see GH#28645 - path = os.path.join(os.path.dirname(__file__), "data", "test_py27.pkl") + path = os.path.join(os.path.dirname(__file__), "data", "pickle", "test_py27.pkl") df = pd.read_pickle(path) # just test the columns are correct since the values are random diff --git a/pandas/tests/io/test_spss.py b/pandas/tests/io/test_spss.py index ca84156d104fc..ccf3167d49371 100644 --- a/pandas/tests/io/test_spss.py +++ b/pandas/tests/io/test_spss.py @@ -9,7 +9,7 @@ def test_spss_labelled_num(datapath): # test file from the Haven project (https://haven.tidyverse.org/) - fname = datapath("io", "data", "labelled-num.sav") + fname = datapath("io", "data", "spss", "labelled-num.sav") df = pd.read_spss(fname, convert_categoricals=True) expected = pd.DataFrame({"VAR00002": "This is one"}, index=[0]) @@ -23,7 +23,7 @@ def test_spss_labelled_num(datapath): def test_spss_labelled_num_na(datapath): # test file from the Haven project (https://haven.tidyverse.org/) - fname = datapath("io", "data", "labelled-num-na.sav") + fname = datapath("io", "data", "spss", "labelled-num-na.sav") df = pd.read_spss(fname, convert_categoricals=True) expected = pd.DataFrame({"VAR00002": ["This is one", None]}) @@ -37,7 +37,7 @@ def test_spss_labelled_num_na(datapath): def test_spss_labelled_str(datapath): # test file from the Haven project (https://haven.tidyverse.org/) - fname = datapath("io", "data", "labelled-str.sav") + fname = datapath("io", "data", "spss", "labelled-str.sav") df = pd.read_spss(fname, convert_categoricals=True) expected = pd.DataFrame({"gender": ["Male", "Female"]}) @@ -51,7 +51,7 @@ def test_spss_labelled_str(datapath): def test_spss_umlauts(datapath): # test file from the Haven project (https://haven.tidyverse.org/) - fname = datapath("io", "data", "umlauts.sav") + fname = datapath("io", "data", "spss", "umlauts.sav") df = pd.read_spss(fname, convert_categoricals=True) expected = pd.DataFrame( @@ -67,7 +67,7 @@ def test_spss_umlauts(datapath): def test_spss_usecols(datapath): # usecols must be list-like - fname = datapath("io", "data", "labelled-num.sav") + fname = datapath("io", "data", "spss", "labelled-num.sav") with pytest.raises(TypeError, match="usecols must be list-like."): pd.read_spss(fname, usecols="VAR00002") diff --git a/pandas/tests/io/test_sql.py b/pandas/tests/io/test_sql.py index 183a47c6039ec..1c80dd9e59164 100644 --- a/pandas/tests/io/test_sql.py +++ b/pandas/tests/io/test_sql.py @@ -275,7 +275,7 @@ def _get_exec(self): else: return self.conn.cursor() - @pytest.fixture(params=[("io", "data", "iris.csv")]) + @pytest.fixture(params=[("data", "iris.csv")]) def load_iris_data(self, datapath, request): import io diff --git a/pandas/tests/io/test_stata.py b/pandas/tests/io/test_stata.py index a0ec06a2197ae..7fa3b968278d9 100644 --- a/pandas/tests/io/test_stata.py +++ b/pandas/tests/io/test_stata.py @@ -28,7 +28,7 @@ @pytest.fixture def dirpath(datapath): - return datapath("io", "data") + return datapath("io", "data", "stata") @pytest.fixture @@ -42,7 +42,7 @@ def parsed_114(dirpath): class TestStata: @pytest.fixture(autouse=True) def setup_method(self, datapath): - self.dirpath = datapath("io", "data") + self.dirpath = datapath("io", "data", "stata") self.dta1_114 = os.path.join(self.dirpath, "stata1_114.dta") self.dta1_117 = os.path.join(self.dirpath, "stata1_117.dta")