Skip to content

Commit

Permalink
Remove pytest-env
Browse files Browse the repository at this point in the history
* We were using the pytest-env plugin to run the tests in a non-UTC time zone.
* The pytest-env plugin doesn't work with pytest-xdist so this was being ignored.
* Also due to the way TZ support works in Python, changing the env var whilst Python is running may or may not result in changes.
  • Loading branch information
MetRonnie committed Dec 21, 2023
1 parent 72d00bd commit 8b2ac18
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/test_fast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,17 @@ jobs:
fail-fast: false # Don't let a failed MacOS run stop the Ubuntu runs
matrix:
os: ['ubuntu-latest']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.10', '3.11']
include:
# mac os test
- os: 'macos-latest'
python-version: '3.7'
python-version: '3.7' # oldest supported version
# non-utc timezone test
- os: 'ubuntu-latest'
python-version: '3.9' # not the oldest, not the most recent version
time-zone: 'XXX-09:35'
env:
TZ: ${{ matrix.time-zone }}
PYTEST_ADDOPTS: --cov --cov-append -n 5 --color=yes
steps:
- name: Checkout
Expand Down
3 changes: 0 additions & 3 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ testpaths =
cylc/flow/
tests/unit/
tests/integration/
env =
# a weird timezone to check that tests aren't assuming the local timezone
# TZ=XXX-09:35
doctest_optionflags =
NORMALIZE_WHITESPACE
IGNORE_EXCEPTION_DETAIL
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ tests =
pytest-asyncio>=0.17,!=0.23.*
pytest-cov>=2.8.0
pytest-xdist>=2
pytest-env>=0.6.2
pytest>=6
testfixtures>=6.11.0
towncrier>=23
Expand Down

0 comments on commit 8b2ac18

Please sign in to comment.