From d52026c59c01c27b43b4550eb82c84173f2b6cc2 Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Thu, 7 Oct 2021 07:01:16 -0700 Subject: [PATCH 01/12] Update test_common_basic.py --- pandas/tests/io/parser/common/test_common_basic.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandas/tests/io/parser/common/test_common_basic.py b/pandas/tests/io/parser/common/test_common_basic.py index ff54a378806fa..6ac057db323ed 100644 --- a/pandas/tests/io/parser/common/test_common_basic.py +++ b/pandas/tests/io/parser/common/test_common_basic.py @@ -12,6 +12,8 @@ import numpy as np import pytest +from pandas.compat import PY310 + from pandas.errors import ( EmptyDataError, ParserError, @@ -674,6 +676,7 @@ def test_read_table_equivalency_to_read_csv(all_parsers): tm.assert_frame_equal(result, expected) +@pytest.skipif(PY310, reason="Initial testing says this test is the culprit") @pytest.mark.parametrize("read_func", ["read_csv", "read_table"]) def test_read_csv_and_table_sys_setprofile(all_parsers, read_func): # GH#41069 From 9201d8576984f81b08abd8c7199d95c05f2666ed Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Thu, 7 Oct 2021 07:01:48 -0700 Subject: [PATCH 02/12] Update python-dev.yml --- .github/workflows/python-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-dev.yml b/.github/workflows/python-dev.yml index 596c3b6df9d49..679545fba6c09 100644 --- a/.github/workflows/python-dev.yml +++ b/.github/workflows/python-dev.yml @@ -61,7 +61,7 @@ jobs: run: | ci/run_tests.sh # GH 41935 - continue-on-error: true + #continue-on-error: true - name: Publish test results uses: actions/upload-artifact@master From 4630a64eee812c010e4378c206f27214e8a716e9 Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Thu, 7 Oct 2021 07:36:05 -0700 Subject: [PATCH 03/12] Update test_common_basic.py --- pandas/tests/io/parser/common/test_common_basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/io/parser/common/test_common_basic.py b/pandas/tests/io/parser/common/test_common_basic.py index 6ac057db323ed..0a88188141a69 100644 --- a/pandas/tests/io/parser/common/test_common_basic.py +++ b/pandas/tests/io/parser/common/test_common_basic.py @@ -676,7 +676,7 @@ def test_read_table_equivalency_to_read_csv(all_parsers): tm.assert_frame_equal(result, expected) -@pytest.skipif(PY310, reason="Initial testing says this test is the culprit") +@pytest.mark.skipif(PY310, reason="Initial testing says this test is the culprit") @pytest.mark.parametrize("read_func", ["read_csv", "read_table"]) def test_read_csv_and_table_sys_setprofile(all_parsers, read_func): # GH#41069 From 946651b77c7479dbc981603f7135219ae15b3a4f Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Thu, 7 Oct 2021 13:26:01 -0700 Subject: [PATCH 04/12] Update test_common_basic.py --- pandas/tests/io/parser/common/test_common_basic.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pandas/tests/io/parser/common/test_common_basic.py b/pandas/tests/io/parser/common/test_common_basic.py index 0a88188141a69..50d5f6a4bd6ba 100644 --- a/pandas/tests/io/parser/common/test_common_basic.py +++ b/pandas/tests/io/parser/common/test_common_basic.py @@ -13,7 +13,6 @@ import pytest from pandas.compat import PY310 - from pandas.errors import ( EmptyDataError, ParserError, From 21e5f62d03e661821ef546e9b8c63eadd25c24b0 Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Thu, 7 Oct 2021 14:17:14 -0700 Subject: [PATCH 05/12] Try not skipping it --- pandas/tests/io/parser/common/test_common_basic.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pandas/tests/io/parser/common/test_common_basic.py b/pandas/tests/io/parser/common/test_common_basic.py index 50d5f6a4bd6ba..4c742513a2598 100644 --- a/pandas/tests/io/parser/common/test_common_basic.py +++ b/pandas/tests/io/parser/common/test_common_basic.py @@ -675,16 +675,17 @@ def test_read_table_equivalency_to_read_csv(all_parsers): tm.assert_frame_equal(result, expected) -@pytest.mark.skipif(PY310, reason="Initial testing says this test is the culprit") +#@pytest.mark.skipif(PY310, reason="Initial testing says this test is the culprit") @pytest.mark.parametrize("read_func", ["read_csv", "read_table"]) def test_read_csv_and_table_sys_setprofile(all_parsers, read_func): # GH#41069 parser = all_parsers data = "a b\n0 1" - + + orig_profile = sys.getprofile() sys.setprofile(lambda *a, **k: None) result = getattr(parser, read_func)(StringIO(data)) - sys.setprofile(None) + sys.setprofile(orig_profile) expected = DataFrame({"a b": ["0 1"]}) tm.assert_frame_equal(result, expected) From ddb3c12e8bb4babdf32c328f2af978522f8811a5 Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Thu, 7 Oct 2021 15:29:33 -0700 Subject: [PATCH 06/12] [skip ci] don't continue-on-error --- .github/workflows/python-dev.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/python-dev.yml b/.github/workflows/python-dev.yml index 679545fba6c09..031c85864538b 100644 --- a/.github/workflows/python-dev.yml +++ b/.github/workflows/python-dev.yml @@ -60,8 +60,6 @@ jobs: - name: Test with pytest run: | ci/run_tests.sh - # GH 41935 - #continue-on-error: true - name: Publish test results uses: actions/upload-artifact@master From bb04f084712f5650e325abebb4b8702dd083cf3c Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Thu, 7 Oct 2021 15:30:43 -0700 Subject: [PATCH 07/12] [skip ci] just skip the test --- pandas/tests/io/parser/common/test_common_basic.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pandas/tests/io/parser/common/test_common_basic.py b/pandas/tests/io/parser/common/test_common_basic.py index 4c742513a2598..de23266318e7d 100644 --- a/pandas/tests/io/parser/common/test_common_basic.py +++ b/pandas/tests/io/parser/common/test_common_basic.py @@ -675,17 +675,16 @@ def test_read_table_equivalency_to_read_csv(all_parsers): tm.assert_frame_equal(result, expected) -#@pytest.mark.skipif(PY310, reason="Initial testing says this test is the culprit") +#@pytest.mark.skipif(PY310, reason="This test is leaking, causing subsequent tests to fail with a cryptic error.") @pytest.mark.parametrize("read_func", ["read_csv", "read_table"]) def test_read_csv_and_table_sys_setprofile(all_parsers, read_func): # GH#41069 parser = all_parsers data = "a b\n0 1" - - orig_profile = sys.getprofile() + sys.setprofile(lambda *a, **k: None) result = getattr(parser, read_func)(StringIO(data)) - sys.setprofile(orig_profile) + sys.setprofile(None) expected = DataFrame({"a b": ["0 1"]}) tm.assert_frame_equal(result, expected) From 5b021b42b4bf7090d1fa48f289574ebd7563c2ad Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Thu, 7 Oct 2021 22:33:29 +0000 Subject: [PATCH 08/12] Fixes from pre-commit [automated commit] --- pandas/tests/io/parser/common/test_common_basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/io/parser/common/test_common_basic.py b/pandas/tests/io/parser/common/test_common_basic.py index de23266318e7d..a910da709d0fc 100644 --- a/pandas/tests/io/parser/common/test_common_basic.py +++ b/pandas/tests/io/parser/common/test_common_basic.py @@ -675,7 +675,7 @@ def test_read_table_equivalency_to_read_csv(all_parsers): tm.assert_frame_equal(result, expected) -#@pytest.mark.skipif(PY310, reason="This test is leaking, causing subsequent tests to fail with a cryptic error.") +# @pytest.mark.skipif(PY310, reason="This test is leaking, causing subsequent tests to fail with a cryptic error.") @pytest.mark.parametrize("read_func", ["read_csv", "read_table"]) def test_read_csv_and_table_sys_setprofile(all_parsers, read_func): # GH#41069 From 25438aff4bb27919973129e97c6d99c850d9cb2a Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Thu, 7 Oct 2021 15:43:08 -0700 Subject: [PATCH 09/12] Update test_common_basic.py --- pandas/tests/io/parser/common/test_common_basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/io/parser/common/test_common_basic.py b/pandas/tests/io/parser/common/test_common_basic.py index a910da709d0fc..e8023f3f866cc 100644 --- a/pandas/tests/io/parser/common/test_common_basic.py +++ b/pandas/tests/io/parser/common/test_common_basic.py @@ -675,7 +675,7 @@ def test_read_table_equivalency_to_read_csv(all_parsers): tm.assert_frame_equal(result, expected) -# @pytest.mark.skipif(PY310, reason="This test is leaking, causing subsequent tests to fail with a cryptic error.") +@pytest.mark.skipif(PY310, reason="This test is leaking, causing subsequent tests to fail with a cryptic error.") @pytest.mark.parametrize("read_func", ["read_csv", "read_table"]) def test_read_csv_and_table_sys_setprofile(all_parsers, read_func): # GH#41069 From dee4ea694a029240e4e1df7f4a43a73cfa8b8c6e Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Thu, 7 Oct 2021 23:33:52 +0000 Subject: [PATCH 10/12] Fixes from pre-commit [automated commit] --- pandas/tests/io/parser/common/test_common_basic.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandas/tests/io/parser/common/test_common_basic.py b/pandas/tests/io/parser/common/test_common_basic.py index e8023f3f866cc..8b58d0a68cded 100644 --- a/pandas/tests/io/parser/common/test_common_basic.py +++ b/pandas/tests/io/parser/common/test_common_basic.py @@ -675,7 +675,10 @@ def test_read_table_equivalency_to_read_csv(all_parsers): tm.assert_frame_equal(result, expected) -@pytest.mark.skipif(PY310, reason="This test is leaking, causing subsequent tests to fail with a cryptic error.") +@pytest.mark.skipif( + PY310, + reason="This test is leaking, causing subsequent tests to fail with a cryptic error.", +) @pytest.mark.parametrize("read_func", ["read_csv", "read_table"]) def test_read_csv_and_table_sys_setprofile(all_parsers, read_func): # GH#41069 From 4eb079533ad157028d3577b8fada5305ae2c33f4 Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Thu, 7 Oct 2021 18:34:36 -0700 Subject: [PATCH 11/12] Update test_common_basic.py --- pandas/tests/io/parser/common/test_common_basic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/tests/io/parser/common/test_common_basic.py b/pandas/tests/io/parser/common/test_common_basic.py index 8b58d0a68cded..825a7de355623 100644 --- a/pandas/tests/io/parser/common/test_common_basic.py +++ b/pandas/tests/io/parser/common/test_common_basic.py @@ -677,7 +677,8 @@ def test_read_table_equivalency_to_read_csv(all_parsers): @pytest.mark.skipif( PY310, - reason="This test is leaking, causing subsequent tests to fail with a cryptic error.", + reason="GH41935 This test is leaking only on Python 3.10," + "causing other tests to fail with a cryptic error.", ) @pytest.mark.parametrize("read_func", ["read_csv", "read_table"]) def test_read_csv_and_table_sys_setprofile(all_parsers, read_func): From 60caa66406c035e56c63347616bf98812b7808fd Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Fri, 8 Oct 2021 02:16:51 +0000 Subject: [PATCH 12/12] Fixes from pre-commit [automated commit] --- pandas/tests/io/parser/common/test_common_basic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/tests/io/parser/common/test_common_basic.py b/pandas/tests/io/parser/common/test_common_basic.py index 825a7de355623..6d958f46a49dd 100644 --- a/pandas/tests/io/parser/common/test_common_basic.py +++ b/pandas/tests/io/parser/common/test_common_basic.py @@ -677,8 +677,8 @@ def test_read_table_equivalency_to_read_csv(all_parsers): @pytest.mark.skipif( PY310, - reason="GH41935 This test is leaking only on Python 3.10," - "causing other tests to fail with a cryptic error.", + reason="GH41935 This test is leaking only on Python 3.10," + "causing other tests to fail with a cryptic error.", ) @pytest.mark.parametrize("read_func", ["read_csv", "read_table"]) def test_read_csv_and_table_sys_setprofile(all_parsers, read_func):