Fix some warnings happening during the tests
Description
Those warnings would be shown when running with PYTHONWARNINGS=default
.
This does not fix all of them, only the one I could identify in a reasonable amount of time. I'll be back with the rest.
Edited by Benjamin Schubert