Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: fix cached point parse contamination between tests #37

Merged
merged 2 commits into from
Dec 21, 2023

Conversation

MetRonnie
Copy link

@MetRonnie MetRonnie commented Dec 21, 2023

In back-compat mode the cycle point time zone is assumed to be local, whereas in normal mode it is assumed to be UTC. There was contamination of the point parse caching where the time zone would carry over from tests of back-compat vs normal mode.

Also removed pytest-env because it doesn't work with pytest-xdist (copied from master - see cylc@be46a11)

In back-compat mode the cycle point time zone is assumed to be local, whereas in normal mode it is assumed to be UTC. There was contamination of the point parse caching where the time zone would carry over from tests of back-compat vs normal mode
* 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.
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.10', '3.11']
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that change intentional?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, so we test non-UTC on one of the python versions

@hjoliver hjoliver merged commit 9c4a7fb into hjoliver:fix-runahead-compute Dec 21, 2023
32 of 36 checks passed
@MetRonnie MetRonnie deleted the tests-cache-tz branch December 21, 2023 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants