Skip to content

test: clean up remaining files after test#4448

Merged
kif merged 4 commits into
silx-kit:mainfrom
kif:4447_clean_tests
Mar 16, 2026
Merged

test: clean up remaining files after test#4448
kif merged 4 commits into
silx-kit:mainfrom
kif:4447_clean_tests

Conversation

@kif
Copy link
Copy Markdown
Member

@kif kif commented Dec 2, 2025

Remove files created during the test to avoid the accumulation of them in tmp-folder
Also: clean-up a config of pytest which is incompatible with former version of pyopencl.

@kif kif requested a review from t20100 December 2, 2025 07:56
@kif
Copy link
Copy Markdown
Member Author

kif commented Dec 2, 2025

close #4447

Comment thread src/silx/conftest.py Outdated
Comment thread src/silx/conftest.py Outdated
except:
pass
else:
if "RepeatedKernelRetrieval" in dir(pyopencl):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this needed?

When does this occurs? Is it limited to a few specific tests? if so, best to filter this warning only for those tests with pytest.mark.filterwarnings

Which version of pyopencl have it/does not have it?
If it's is old enough, IMO it reasonable to enforce a minimum version in the dependencies and spare the if statement
If not, it's best to test the version of pyopencl rather than relying on a hasattr-like test so it documents why this check is needed for (and when we can get rid of it).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Elder version of pyopencl (2025.1) do not have this attribute. Silencing a warning that does not exist simply prevents pytest from launching.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you either check the version number instead or add a comment with the required pyopencl version?
So we have a chance to remove this at some point

kif and others added 3 commits December 3, 2025 11:25
@kif kif mentioned this pull request Dec 8, 2025
1 task
@payno
Copy link
Copy Markdown
Member

payno commented Mar 13, 2026

@kif @t20100 what is the status of this PR ?

Comment thread src/silx/conftest.py
@kif kif merged commit 56a16f5 into silx-kit:main Mar 16, 2026
4 checks passed
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.

3 participants