test: clean up remaining files after test#4448
Conversation
|
close #4447 |
| except: | ||
| pass | ||
| else: | ||
| if "RepeatedKernelRetrieval" in dir(pyopencl): |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
Elder version of pyopencl (2025.1) do not have this attribute. Silencing a warning that does not exist simply prevents pytest from launching.
There was a problem hiding this comment.
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
Co-authored-by: Thomas VINCENT <thomas.vincent@esrf.fr>
<Module or Topic>: <Action> <Summary>(see contributing guidelines)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.