pygame-ce icon indicating copy to clipboard operation
pygame-ce copied to clipboard

Fix spam-esque warnings in our unit tests

Open MyreMylar opened this issue 10 months ago • 0 comments
trafficstars

I've noticed when running the tests locally that we've built up some spammy warnings, particularly deprecation warnings from our own code that is making it harder to spot other warnings that we perhaps should address.

I've been running:

pytest test -s

to see these outputted into the console.

#3274 is an example of a PR to fix these issues in one of the test modules.

In general, where we are calling warnings/code that we know generates warnings deliberately we can wrap them in a with context block to acknowledge that is the intention. Where old code is called incidentally/historically we may be able to replace it with new code.

Other test modules with this issue:

  • [ ] scrap_test
  • [ ] color_test
  • [ ] display_test
  • [ ] font_test/ftfont_test (the same warning in both needs wrapping)
  • [ ] pixelcopy_test
  • [ ] sndarray_test
  • [ ] surface_test
  • [ ] window_test

Anyone, please fell free to fix one of these modules so we can tick them off.

MyreMylar avatar Dec 30 '24 16:12 MyreMylar