diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f5c34f2..0464dba 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 - - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: '3.10' diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 206dd93..5574b50 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -79,7 +79,7 @@ jobs: with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: ${{ matrix.python-version }} - name: Install Tox diff --git a/tests/test_encoding.py b/tests/test_encoding.py index 0319e9f..8215299 100644 --- a/tests/test_encoding.py +++ b/tests/test_encoding.py @@ -7,6 +7,7 @@ import pytest pytest_plugins = ["pytester"] +IS_CI = os.getenv("CI", "false") == "true" @pytest.fixture( @@ -132,7 +133,7 @@ def test_basic_file_encoding_overwrite(testdir, basic_file, charset, ini_file): assert expected in Path(file).read_text(encoding) -@pytest.mark.skipif(os.getenv("CI", False), reason="skip on CI") +@pytest.mark.skipif(IS_CI, reason="skip on CI") def test_legacy_diff(testdir, capsys, basic_file, charset): """ Legacy test are supported to fail on Windows, when no encoding is provided. @@ -158,7 +159,7 @@ def test_legacy_diff(testdir, capsys, basic_file, charset): assert diff in stdout -@pytest.mark.skipif(os.getenv("CI", False), reason="skip on CI") +@pytest.mark.skipif(IS_CI, reason="skip on CI") def test_legacy_overwrite(testdir, basic_file, charset): """ Legacy test are supported to fail on Windows, when no encoding is provided. diff --git a/tox.ini b/tox.ini index d81ccfe..ade7ec9 100644 --- a/tox.ini +++ b/tox.ini @@ -9,6 +9,7 @@ isolated_build = true [testenv] changedir = .tmp/{envname} +passenv = HOME,WINDIR,LC_ALL,LC_CTYPE,CI setenv = numpydev: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple description = run tests