Skip to content

Tests: check color classmethods on instances #3491

@AntonisDevStuff

Description

@AntonisDevStuff

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions