Skip to content

Commit

Permalink
Merge pull request #434 from MyreMylar/add-2-2-0-pygame-test
Browse files Browse the repository at this point in the history
Add 2.2.1 to testing CI
  • Loading branch information
MyreMylar authored Apr 6, 2023
2 parents d0ad4be + e404e04 commit 9e728ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/run_tests_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
max-parallel: 4
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
pygame-ce-version: ['2.1.4']
pygame-ce-version: ['2.1.4', '2.2.1']
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
max-parallel: 4
matrix:
python-version: [ '3.11' ]
pygame-ce-version: [ '2.1.4' ]
pygame-ce-version: [ '2.1.4', '2.2.1' ]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
max-parallel: 4
matrix:
python-version: [ '3.11' ]
pygame-ce-version: [ '2.1.4' ]
pygame-ce-version: [ '2.1.4', '2.2.1' ]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
Expand Down
6 changes: 5 additions & 1 deletion tests/test_core/test_colour_gradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ def test_apply_gradient_to_surface(self, _init_pygame):
gradient.apply_gradient_to_surface(test_surface)

after_application_colour = test_surface.get_at((0, 0))
assert after_application_colour == pygame.Color(0, 11, 243, 255)
if pygame.vernum.major >= 2 and pygame.vernum.minor >= 2:
# The scaling algorithm changed slightly in 2.2, this affects the gradient color
assert after_application_colour == pygame.Color(0, 5, 249, 255)
else:
assert after_application_colour == pygame.Color(0, 11, 243, 255)


if __name__ == '__main__':
Expand Down

0 comments on commit 9e728ef

Please sign in to comment.