I'd probably shut that warning up using the warnings module API rather than weaking the test more broadly. Also - track down and file a bug on the leak source.