joystick_test.py 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. import unittest
  2. class JoystickTypeTest(unittest.TestCase):
  3. def todo_test_Joystick(self):
  4. # __doc__ (as of 2008-08-02) for pygame.joystick.Joystick:
  5. # pygame.joystick.Joystick(id): return Joystick
  6. # create a new Joystick object
  7. #
  8. # Create a new joystick to access a physical device. The id argument
  9. # must be a value from 0 to pygame.joystick.get_count()-1.
  10. #
  11. # To access most of the Joystick methods, you'll need to init() the
  12. # Joystick. This is separate from making sure the joystick module is
  13. # initialized. When multiple Joysticks objects are created for the
  14. # same physical joystick device (i.e., they have the same ID number),
  15. # the state and values for those Joystick objects will be shared.
  16. #
  17. # The Joystick object allows you to get information about the types of
  18. # controls on a joystick device. Once the device is initialized the
  19. # Pygame event queue will start receiving events about its input.
  20. #
  21. # You can call the Joystick.get_name() and Joystick.get_id() functions
  22. # without initializing the Joystick object.
  23. #
  24. self.fail()
  25. class JoytickModuleTest(unittest.TestCase):
  26. def todo_test_get_count(self):
  27. # __doc__ (as of 2008-08-02) for pygame.joystick.get_count:
  28. # pygame.joystick.get_count(): return count
  29. # number of joysticks on the system
  30. #
  31. # Return the number of joystick devices on the system. The count will
  32. # be 0 if there are no joysticks on the system.
  33. #
  34. # When you create Joystick objects using Joystick(id), you pass an
  35. # integer that must be lower than this count.
  36. #
  37. self.fail()
  38. def todo_test_get_init(self):
  39. # __doc__ (as of 2008-08-02) for pygame.joystick.get_init:
  40. # pygame.joystick.get_init(): return bool
  41. # true if the joystick module is initialized
  42. #
  43. # Test if the pygame.joystick.init() function has been called.
  44. self.fail()
  45. def todo_test_init(self):
  46. # __doc__ (as of 2008-08-02) for pygame.joystick.init:
  47. # pygame.joystick.init(): return None
  48. # initialize the joystick module
  49. #
  50. # This function is called automatically by pygame.init().
  51. # It initializes the joystick module. This will scan the system for
  52. # all joystick devices. The module must be initialized before any
  53. # other functions will work.
  54. #
  55. # It is safe to call this function more than once.
  56. self.fail()
  57. def todo_test_quit(self):
  58. # __doc__ (as of 2008-08-02) for pygame.joystick.quit:
  59. # pygame.joystick.quit(): return None
  60. # uninitialize the joystick module
  61. #
  62. # Uninitialize the joystick module. After you call this any existing
  63. # joystick objects will no longer work.
  64. #
  65. # It is safe to call this function more than once.
  66. self.fail()
  67. ################################################################################
  68. if __name__ == '__main__':
  69. unittest.main()