Treat deprecation warnings as errors in the tests
#366 (closed) highlights that our tests do not catch a certain subset of potential bugs that (IMO) they ought to.
One way to fix this specific class of bugs (where we are using deprecated API) is to make deprecation warnings errors in the tests.
I haven't looked but I am almost certain pytest can be configured to do this.
Needs Discussion because we might also catch lots of cruft with this.