Skip to content

Tests: check color classmethods on instances #3491

Closed

Description

@AntonisPylos

See: #3456 (review)

As suggested, tests for all the from_* class methods of Color can be added to check their use to an instance.

for example:

pygame.Color(0,0,0).from_normalized(1,1,1) == pygame.Color(255,255,255,255)
pygame.Color(1,1,1).from_cmy(1,1,1) == pygame.Color(0,0,0,255)
pygame.Color(255, 0, 0, 255).from_hex("#00FF00") == pygame.Color(0,255,0,255)
...

Note: the value of the instance doesn't affect the result.

Activity

  1. added theissue type on Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    colorpygame.colorteststests (module)

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions