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

display.get_driver() test and fix #1911

Merged
merged 3 commits into from Jun 5, 2020
Merged
Changes from 1 commit
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
33 changes: 17 additions & 16 deletions test/display_test.py
Expand Up @@ -103,22 +103,23 @@ def test_caption_unicode(self):
else:
self.assertEqual(unicode_(display.get_caption()[0], "utf8"), TEST_CAPTION)

def todo_test_get_driver(self):

# __doc__ (as of 2008-08-02) for pygame.display.get_driver:

# pygame.display.get_driver(): return name
# get the name of the pygame display backend
#
# Pygame chooses one of many available display backends when it is
# initialized. This returns the internal name used for the display
# backend. This can be used to provide limited information about what
# display capabilities might be accelerated. See the SDL_VIDEODRIVER
# flags in pygame.display.set_mode() to see some of the common
# options.
#

self.fail()
def test_get_driver(self):
drivers = [
'windib',
'directx',
'x11',
'dga',
'fbcon',
'directfb',
'ggi',
'vgl',
'svgalib',
'aalib',
'cocoa',
'dummy'
]
driver = display.get_driver()
self.assertIn(driver, drivers)

def test_get_init(self):
"""Ensures the module's initialization state can be retrieved."""
Expand Down