-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
autotest: make utilities, pyscript tests run independently #8097
Conversation
9bd1d8c
to
8e313f2
Compare
💪 |
8e313f2
to
5b0ddfd
Compare
I'm working though a couple Windows issues here:
|
447f387
to
3445972
Compare
If we’re using pytest-dev/pytest#8141 ha changed retention behaviour to keep only failed test data by default too (configurable via |
for test_gdal_edit_py_3 failure, changing |
3445972
to
1ffa709
Compare
I've made this change, though I worry similar issues may pop up in other places and cause confusing platform-specific test failures. I tried to address the root cause by patching
But this causes other failures, such as I guess I'm inclined to leave it as-is now, but maybe a better solution will come. |
1ffa709
to
15adb6d
Compare
Regarding the failures on the build-windows-conda target, cf #8123 (once 8123 passes, please rebase on top of it or master if it is merged) |
15adb6d
to
2afea0a
Compare
Patching stdlib to behave opposite to the platform's behaviour seems like a dangerous approach to solve it...
IIUC on Windows
Where do we have newlines in command strings? Should/are they CRLF ( |
Agree - it was an option I shared from my search for the least bad solution. In this case it created more problems than it solved.
That's what I've done here, though it caused a handful of Windows-only failures that were difficult for me to understand and reproduce.
The only one that executes on CI was addressed in a32e4ff |
ah, I had a search in master and found that code, but I hadn't spotted Even had merged this already - hence the confusion 👍 |
What does this PR do?
This PR makes tests under the
utilities
andpyscripts
folders run independently, using the following types of changes:Pulling out generated data that is used by multiple tests into module-scoped fixtures.
Moving cleanup steps from a dummy test into a fixture, or in some cases writing generated files to a location provided by
tmp_path
to avoid the need for a cleanup fixture. Thetmp_path
method is more invasive but probably easier for understand, so it might be worth doing this in all cases.Merging tests, occasionally, such as a test that writes a file followed by a test that reads the file.
Flagging tests as non-independent using the
random_order(disabled=True)
marker (44b24c8).These will need to be addressed eventually if we want to run the tests in parallel.
While I was in there, I also split and parameterized some tests (2062341)
What are related issues/pull requests?
#4407
Tasklist