Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unit test for Surface.get_locks function #1980

Merged
merged 2 commits into from Jul 30, 2020

Conversation

jtoloff
Copy link
Contributor

@jtoloff jtoloff commented Jun 24, 2020

I believe I added all the tests needed to ensure the expected functionality, please let me know if there is anything I can improve upon.

@robertpfeiffer
Copy link
Contributor

This needs to check for pixelarray locks as well.

@jtoloff
Copy link
Contributor Author

jtoloff commented Jun 24, 2020

How does the new commit look? Does the added test check pixelarray locks sufficiently?

@robertpfeiffer
Copy link
Contributor

I just realised that there are two PRs for surface locking. I guess this is good enough for get_locks.

Copy link
Contributor

@MyreMylar MyreMylar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to see a check that test the output with more than one lock on a surface. e.g. if you call:

surface.lock()
surface.lock()
surface.lock()
output = surface.get_locks()  # this should be checked 

Otherwise it seems fine.

@MyreMylar
Copy link
Contributor

Just gonna merge this anyway because it's better than what we have.

@MyreMylar MyreMylar merged commit 1a88649 into pygame:master Jul 30, 2020
@illume illume added the Surface pygame.Surface label Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Surface pygame.Surface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants