Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions test/joystick_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,17 @@ def todo_test_init(self):

self.fail()

def todo_test_quit(self):
def test_quit(self):
"""Test if joystick.quit works."""

pygame.joystick.init()

# __doc__ (as of 2008-08-02) for pygame.joystick.quit:
self.assertIsNotNone(pygame.joystick.get_count()) #Is not None before quit

# pygame.joystick.quit(): return None
# uninitialize the joystick module
#
# Uninitialize the joystick module. After you call this any existing
# joystick objects will no longer work.
#
# It is safe to call this function more than once.
pygame.joystick.quit()

self.fail()
with self.assertRaises(pygame.error): #Raises error if quit worked
pygame.joystick.get_count()


################################################################################
Expand Down