Pygame

Latest version: v2.6.0

Safety actively analyzes 641024 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 10 of 11

1.9.3

Not secure

1.9.2

Not secure

1.9.1

1.9.0

1.8.1

Not secure

1.8.0

Not secure
The count can be found with the following command run in the pygame code base:

grep todo test/*.py | wc -l


'[goodfirstissue](https://github.com/pygame/pygame/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)' is a label applied to issues which would be good for someone who wants to try contributing to a Free, Open Source, or community project (like pygame). A lot of these issues were written up containing unit tests that needed to be finished off.

Unfortunately we will probably run out of things to test in some months. We hope to prepare new types of 'good first issues', and educational material in other areas next. So that there is something else for people who are interested in contributing as a way to learn. Hopefully we can structure it as a learning pathway, with even some advanced topics.



Thanks to Andy Nguyen anguye13, who worked on a number of tests in the display, image, and surface areas.
- [Unit test for image.save_extended()](https://github.com/pygame/pygame/pull/2040)
- [display.set_gamma_ramp() unit test](https://github.com/pygame/pygame/pull/2039)
- [Added unit test: surface.get_shifts()](https://github.com/pygame/pygame/pull/2034)
- [Added unit test: surface.get_pitch()](https://github.com/pygame/pygame/pull/2037)

Adam Andrews adamandrews1 worked on the transform, threads parts of the code base. They have also begun work on cleaning up the buffer code, which is in C and kind of complicated. But that work is still waiting, and will likely make it into the next release.
- [threads.benchmark_workers and threads.WorkerQueue.do](https://github.com/pygame/pygame/pull/2064)
- [pygame.transform.smoothscale](https://github.com/pygame/pygame/pull/2063)
- [Reintroduce sizing checks for transform.smoothscale test](https://github.com/pygame/pygame/pull/2074)

Travis Chang Reminisque
- [Added unit test for mouse.get_cursor()](https://github.com/pygame/pygame/pull/1955)
- [Add unit test for surface.get_losses](https://github.com/pygame/pygame/pull/2020)
- [Add mouse.set_cursor unit test](https://github.com/pygame/pygame/pull/1967)

Dan Lawrence MyreMylar
- [Some colorkey test fixes](https://github.com/pygame/pygame/pull/1913)
- [Testing mixer.music.play() start parameter & adding mp3 warning](https://github.com/pygame/pygame/pull/1886)

khuang0312
- [Added time.get_ticks() and time test improvements](https://github.com/pygame/pygame/pull/1880)
- [surface.get_colorkey() test](https://github.com/pygame/pygame/pull/1881)

lkito
- [Surface.get_bitsize and Surface.get_bytesize tests](https://github.com/pygame/pygame/pull/1898)
- [Surface.test_get_abs_parent and Surface.test_get_abs_offset tests, and fix.](https://github.com/pygame/pygame/pull/1900)

Pedro de la Peña pedrodelapena
- [Unit tests for time.Clock.get_time()](https://github.com/pygame/pygame/pull/1909)
- [Unit tests for transform.rotate()](https://github.com/pygame/pygame/pull/1960)

galexandreg continued to
- [Add time.set_timer() unittest](https://github.com/pygame/pygame/pull/1924)
- [Add some mixer Sound tests](https://github.com/pygame/pygame/pull/1934)

tsadama
- [Added unit tests for display.toggle_fullscreen and display.get_active](https://github.com/pygame/pygame/pull/1927)
- [Added Unit Test for joystick.init()](https://github.com/pygame/pygame/pull/1937)

pygame.joystick tests

raphacosta27 [Add unit test: joystick.quit()](https://github.com/pygame/pygame/pull/1912)
Bill AdditionalPylons [Added unit test: JoystickModuleTest.test_get_count](https://github.com/pygame/pygame/pull/2009)

pygame.display tests

Gabriel Moreira gabsmoreira [Add unit test: display.get_driver](https://github.com/pygame/pygame/pull/1911)
zoldalma999 [Adding unit test to display.iconify](https://github.com/pygame/pygame/pull/2006)
amipy [Added a unit test for display.flip()](https://github.com/pygame/pygame/pull/2054)
DGMcKenney [Adds a unit test of the display.set_icon() function.](https://github.com/pygame/pygame/pull/2042)
Grigoris Tsopouridis gtsopus [Add display.set_gamma unit test](https://github.com/pygame/pygame/pull/1942)

pygame.time tests

Ilia Gogotchuri Gogotchuri [Implemented time.Clock.get_fps unit test](https://github.com/pygame/pygame/pull/1926)
Jim Quach jiquach [Add unit test to Clock.get_rawtime](https://github.com/pygame/pygame/pull/1939)
Aaron Li AaronLi [Added test for time.Clock.tick()](https://github.com/pygame/pygame/pull/1938)
Clark Seanor cruxicheiros [Add basic tests for time.Clock.tick_busy_loop](https://github.com/pygame/pygame/pull/1976)

pygame.threads tests

K Duggan kduggan15 [Adds test for threadloop](https://github.com/pygame/pygame/pull/1961)
Michał Górny mgorny [Replace long-deprecated Thread.isAlive() with .is_alive()](https://github.com/pygame/pygame/pull/1928)
Clark Seanor cruxicheiros [threads.tmap() test and and fix. Unsurfaced bug 1768](https://github.com/pygame/pygame/pull/1965)

pygame.Surface tests

jtoloff [unit test for Surface.get_locks function](https://github.com/pygame/pygame/pull/1980)
41aaronb [Added unit test for the surface.lock() function](https://github.com/pygame/pygame/pull/1977)

other tests

Prasanna Venkatesh hanzohasashi33 [math.Vector.scale_to_length docs and add test for display.set_palette()](https://github.com/pygame/pygame/pull/1972)
zoldalma999 [Add unit test to image.get_extended](https://github.com/pygame/pygame/pull/2002)
Nihal Mittal codescientist703 [Added unit test for pygame.cursors.compile](https://github.com/pygame/pygame/pull/2012)
leopoldwe [Add key.get focused unit test](https://github.com/pygame/pygame/pull/2026)



draw

Josip Komljenović MightyJosip [Fixed drawing of ellipse. No more holes.](https://github.com/pygame/pygame/pull/1994)

Old:
![Old](https://user-images.githubusercontent.com/29337110/86373093-4e61ee80-bc83-11ea-839a-febb416075d1.png)
New:
![New](https://user-images.githubusercontent.com/29337110/86373038-3db17880-bc83-11ea-9b44-903e40eb658b.png)

Scott Noyes snoyes [draw_py._draw_line: Use correct endpoints during swap](https://github.com/pygame/pygame/pull/1964)

Charles charlesej [Fix aatrigon/aapolygon drawing horizontal edges](https://github.com/pygame/pygame/pull/2015)



Math

Daniel Pope lordmauve [Fix OOB access in math.Vector swizzle; add '0' and '1' swizzles](https://github.com/pygame/pygame/pull/2024)

These will be useful to prepare [homogenous coordinates for affine transforms by matrix multiplication](https://en.wikipedia.org/wiki/Transformation_matrix#Affine_transformations). Here is a matrix representing a 2x scale + (3, -1) translation:

python
>>> import numpy as np
>>> from pygame.math import Vector2

Page 10 of 11

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.