The pandas test suite uses an ensure_clean utility function to create a temporary file for testing https://github.com/pandas-dev/pandas/blob/22bae73689e10bcdf11a1ad6056bac8aeaeaf57f/pandas/_testing/contexts.py#L101
This utility should be largely redundant with the temp_file pytest fixture https://github.com/pandas-dev/pandas/blob/22bae73689e10bcdf11a1ad6056bac8aeaeaf57f/pandas/conftest.py#L2105
Since there are about ~180 occurrences of ensure_clean in the code base, this issue should be completed in multiple PRs that replaces ensure_clean with temp_file in a particular file. Therefore, this issue can be worked on by multiple contributors.
For those interested in working on this issue:
- Comment below on which file in
pandas/testsyou'll be working on. - Submit a PR that replace
ensure_cleanwithtemp_filewhich still passes the tests.
Once all the uses of ensure_clean are replaced, a separate PR to remove ensure_clean would be welcome.
Comment From: pandeconscious
I will be working on the following files:
pandas/tests/frame/methods/test_to_csv.py
pandas/tests/io/formats/test_to_csv.py
pandas/tests/io/test_parquet.py
Comment From: ritoban23
I would like to work on :
- pandas/tests/io/test_compression.py
- pandas/tests/io/test_pickle.py
- pandas/tests/io/xml/test_to_xml.py
Comment From: kianelbo
I'm doing:
- pandas/tests/io/test_sql.py
- pandas/tests/io/parser/test_index_col.py
- pandas/tests/io/parser/test_python_parser_only.py
- pandas/tests/io/parser/common/test_chunksize.py
- pandas/tests/io/parser/common/test_iterator.py
- pandas/tests/io/parser/pytables/test_round_trip.py
Comment From: jsngn
I'm working on these files:
- pandas/tests/io/test_feather.py
- pandas/tests/io/test_orc.py
- pandas/tests/io/formats/test_to_latex.py
- pandas/tests/io/formats/style/test_style.py
- pandas/tests/io/json/test_readlines.py
Comment From: pandeconscious
PR for the files I picked up: https://github.com/pandas-dev/pandas/pull/62461
Comment From: sanggon6107
I would like to work on these files :
pandas/tests/io/json/test_compression.pypandas/tests/io/json/test_pandas.py
Comment From: mrkarna
I would like to work on these files to start with: - pandas/tests/io/xml/test_xml_dtypes.py - pandas/tests/io/parser/test_encoding.py