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

Add Surface.get_size test #1822

Merged
merged 3 commits into from May 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 6 additions & 10 deletions test/surface_test.py
Expand Up @@ -1127,16 +1127,12 @@ def todo_test_get_shifts(self):

self.fail()

def todo_test_get_size(self):

# __doc__ (as of 2008-08-02) for pygame.surface.Surface.get_size:

# Surface.get_size(): return (width, height)
# get the dimensions of the Surface
#
# Return the width and height of the Surface in pixels.

self.fail()
def test_get_size(self):
sizes = ((1,1), (119, 10), (1000,1000), (1,5000), (1221,1), (99,999))
for width, height in sizes:
surf = pygame.Surface((width, height))
found_size = surf.get_size()
self.assertEqual((width, height), found_size)

def todo_test_lock(self):

Expand Down