From cb0e3b3ae33712ad27beffc94fcdbad61d922bd2 Mon Sep 17 00:00:00 2001 From: Melissa DeLucchi <113376043+delucchi-cmu@users.noreply.github.com> Date: Mon, 15 Sep 2025 12:56:37 -0400 Subject: [PATCH 1/4] Confirm behavior under windows. --- .github/workflows/testing-windows.yml | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/testing-windows.yml diff --git a/.github/workflows/testing-windows.yml b/.github/workflows/testing-windows.yml new file mode 100644 index 00000000..a9ec58a0 --- /dev/null +++ b/.github/workflows/testing-windows.yml @@ -0,0 +1,33 @@ +# This workflow will install Python dependencies and run tests in a Windows environment. +# This is intended to catch any file-system specific issues, and so runs less +# frequently than other test suites. + +name: Windows unit test + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: windows-latest + strategy: + matrix: + python-version: ['3.10'] + + steps: + - uses: actions/checkout@v5 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e .[dev] + - name: Run unit tests with pytest + run: | + python -m pytest tests \ No newline at end of file From 4962923c5e767f8332b6551eb78401c8d8ca06e4 Mon Sep 17 00:00:00 2001 From: Melissa DeLucchi <113376043+delucchi-cmu@users.noreply.github.com> Date: Mon, 15 Sep 2025 13:49:19 -0400 Subject: [PATCH 2/4] Try to avoid concurrent access. --- tests/nested_pandas/nestedframe/test_io.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/nested_pandas/nestedframe/test_io.py b/tests/nested_pandas/nestedframe/test_io.py index af957fc6..d8088308 100644 --- a/tests/nested_pandas/nestedframe/test_io.py +++ b/tests/nested_pandas/nestedframe/test_io.py @@ -302,7 +302,8 @@ def test_read_empty_parquet(): """Test that we can read empty parquet files""" orig_nf = generate_data(1, 2).iloc[:0] - with tempfile.NamedTemporaryFile("wb", suffix="parquet") as tmpfile: + with tempfile.NamedTemporaryFile("wb", suffix=".parquet", delete_on_close=False) as tmpfile: + tmpfile.close() orig_nf.to_parquet(tmpfile.name) # All columns # Do not check dtype because of: @@ -333,7 +334,7 @@ def test_read_parquet_list_autocast(): "d": [[10, 20, 30], [40, 50, 60], [70, 80, 90]], } ) - with tempfile.NamedTemporaryFile("wb", suffix="parquet") as tmpfile: + with tempfile.NamedTemporaryFile("wb", suffix=".parquet") as tmpfile: list_nf.to_parquet(tmpfile.name) nf = read_parquet(tmpfile.name, autocast_list=True) From a8147862667011f9a42718de1007ab0d7d7d626a Mon Sep 17 00:00:00 2001 From: Melissa DeLucchi <113376043+delucchi-cmu@users.noreply.github.com> Date: Mon, 15 Sep 2025 13:54:39 -0400 Subject: [PATCH 3/4] not 3.12 --- tests/nested_pandas/nestedframe/test_io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/nested_pandas/nestedframe/test_io.py b/tests/nested_pandas/nestedframe/test_io.py index d8088308..5bb87d6d 100644 --- a/tests/nested_pandas/nestedframe/test_io.py +++ b/tests/nested_pandas/nestedframe/test_io.py @@ -302,7 +302,7 @@ def test_read_empty_parquet(): """Test that we can read empty parquet files""" orig_nf = generate_data(1, 2).iloc[:0] - with tempfile.NamedTemporaryFile("wb", suffix=".parquet", delete_on_close=False) as tmpfile: + with tempfile.NamedTemporaryFile("wb", suffix=".parquet") as tmpfile: tmpfile.close() orig_nf.to_parquet(tmpfile.name) # All columns From 15124f3150cc46318f81623f86712bb0465fd448 Mon Sep 17 00:00:00 2001 From: Melissa DeLucchi <113376043+delucchi-cmu@users.noreply.github.com> Date: Mon, 15 Sep 2025 13:57:46 -0400 Subject: [PATCH 4/4] Close both. --- tests/nested_pandas/nestedframe/test_io.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/nested_pandas/nestedframe/test_io.py b/tests/nested_pandas/nestedframe/test_io.py index 5bb87d6d..24b56103 100644 --- a/tests/nested_pandas/nestedframe/test_io.py +++ b/tests/nested_pandas/nestedframe/test_io.py @@ -335,6 +335,7 @@ def test_read_parquet_list_autocast(): } ) with tempfile.NamedTemporaryFile("wb", suffix=".parquet") as tmpfile: + tmpfile.close() list_nf.to_parquet(tmpfile.name) nf = read_parquet(tmpfile.name, autocast_list=True)