Skip to content

Fix spam-esque warnings in our unit tests #3275

Open
@MyreMylar

Description

@MyreMylar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    teststests (module)

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions