From b0cea71b7c153c60c5b4feb06a16aa2c75307cfe Mon Sep 17 00:00:00 2001 From: Erin Sheldon Date: Tue, 18 Jun 2024 20:08:12 -0400 Subject: [PATCH] skip recfile tests on windows --- .github/workflows/test-windows.yaml | 1 - esutil/tests/test_recfile.py | 8 ++++---- esutil/tests/test_sfile.py | 12 ++++++------ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-windows.yaml b/.github/workflows/test-windows.yaml index ba61850..97d5620 100644 --- a/.github/workflows/test-windows.yaml +++ b/.github/workflows/test-windows.yaml @@ -34,5 +34,4 @@ jobs: - name: test run: | pip install pytest - set SKIP_RECFILE_TESTS="true" pytest -vv esutil diff --git a/esutil/tests/test_recfile.py b/esutil/tests/test_recfile.py index 5e25645..bad1dab 100644 --- a/esutil/tests/test_recfile.py +++ b/esutil/tests/test_recfile.py @@ -176,8 +176,8 @@ def compare_rec(rec1, rec2, name): assert w.size == 0, "testing column %s" % f -@pytest.mark.skipif('SKIP_RECFILE_TESTS' in os.environ, - reason='SKIP_RECFILE_TESTS set') +@pytest.mark.skipif(os.name == 'nt', + reason='skip recfile tests on windows') @pytest.mark.parametrize('delim', [None, ",", ":", "\t", " "]) @pytest.mark.parametrize('doswap', [False, True]) def test_recfile_writeread(delim, doswap): @@ -216,8 +216,8 @@ def test_recfile_writeread(delim, doswap): ) -@pytest.mark.skipif('SKIP_RECFILE_TESTS' in os.environ, - reason='SKIP_RECFILE_TESTS set') +@pytest.mark.skipif(os.name == 'nt', + reason='skip recfile tests on windows') @pytest.mark.parametrize('delim', [None, ",", ":", "\t", " "]) @pytest.mark.parametrize('doswap', [False, True]) def test_recfile_subsets(delim, doswap): diff --git a/esutil/tests/test_sfile.py b/esutil/tests/test_sfile.py index 1928eb8..5c47180 100644 --- a/esutil/tests/test_sfile.py +++ b/esutil/tests/test_sfile.py @@ -195,8 +195,8 @@ def compare_rec(rec1, rec2, name): assert w.size == 0, "testing column %s" % f -@pytest.mark.skipif('SKIP_RECFILE_TESTS' in os.environ, - reason='SKIP_RECFILE_TESTS set') +@pytest.mark.skipif(os.name == 'nt', + reason='skip recfile tests on windows') @pytest.mark.parametrize('delim', [None, ",", ":", "\t", " "]) @pytest.mark.parametrize('doswap', [False, True]) def test_sfile_writeread(delim, doswap): @@ -236,8 +236,8 @@ def test_sfile_writeread(delim, doswap): compare_header(header, h) -@pytest.mark.skipif('SKIP_RECFILE_TESTS' in os.environ, - reason='SKIP_RECFILE_TESTS set') +@pytest.mark.skipif(os.name == 'nt', + reason='skip recfile tests on windows') @pytest.mark.parametrize('delim', [None, ",", ":", "\t", " "]) @pytest.mark.parametrize('doswap', [False, True]) def test_sfile_subsets(delim, doswap): @@ -377,8 +377,8 @@ def test_sfile_subsets(delim, doswap): ) -@pytest.mark.skipif('SKIP_RECFILE_TESTS' in os.environ, - reason='SKIP_RECFILE_TESTS set') +@pytest.mark.skipif(os.name == 'nt', + reason='skip recfile tests on windows') @pytest.mark.parametrize('delim', [None, ",", ":", "\t", " "]) @pytest.mark.parametrize('doswap', [False, True]) def test_sfile_append(delim, doswap):