1
#################################### IMPORTS ###################################
3
if __name__ == '__main__':
6
pkg_dir = os.path.split(os.path.abspath(__file__))[0]
7
parent_dir, pkg_name = os.path.split(pkg_dir)
8
is_pygame_pkg = (pkg_name == 'tests' and
9
os.path.split(parent_dir)[1] == 'pygame')
11
sys.path.insert(0, parent_dir)
13
is_pygame_pkg = __name__.startswith('pygame.tests.')
17
################################################################################
19
class JoystickTypeTest(unittest.TestCase):
20
def todo_test_Joystick(self):
22
# __doc__ (as of 2008-08-02) for pygame.joystick.Joystick:
24
# pygame.joystick.Joystick(id): return Joystick
25
# create a new Joystick object
27
# Create a new joystick to access a physical device. The id argument
28
# must be a value from 0 to pygame.joystick.get_count()-1.
30
# To access most of the Joystick methods, you'll need to init() the
31
# Joystick. This is separate from making sure the joystick module is
32
# initialized. When multiple Joysticks objects are created for the
33
# same physical joystick device (i.e., they have the same ID number),
34
# the state and values for those Joystick objects will be shared.
36
# The Joystick object allows you to get information about the types of
37
# controls on a joystick device. Once the device is initialized the
38
# Pygame event queue will start receiving events about its input.
40
# You can call the Joystick.get_name() and Joystick.get_id() functions
41
# without initializing the Joystick object.
46
class JoytickModuleTest(unittest.TestCase):
47
def todo_test_get_count(self):
49
# __doc__ (as of 2008-08-02) for pygame.joystick.get_count:
51
# pygame.joystick.get_count(): return count
52
# number of joysticks on the system
54
# Return the number of joystick devices on the system. The count will
55
# be 0 if there are no joysticks on the system.
57
# When you create Joystick objects using Joystick(id), you pass an
58
# integer that must be lower than this count.
63
def todo_test_get_init(self):
65
# __doc__ (as of 2008-08-02) for pygame.joystick.get_init:
67
# pygame.joystick.get_init(): return bool
68
# true if the joystick module is initialized
70
# Test if the pygame.joystick.init() function has been called.
74
def todo_test_init(self):
76
# __doc__ (as of 2008-08-02) for pygame.joystick.init:
78
# pygame.joystick.init(): return None
79
# initialize the joystick module
81
# This function is called automatically by pygame.init().
82
# It initializes the joystick module. This will scan the system for
83
# all joystick devices. The module must be initialized before any
84
# other functions will work.
86
# It is safe to call this function more than once.
90
def todo_test_quit(self):
92
# __doc__ (as of 2008-08-02) for pygame.joystick.quit:
94
# pygame.joystick.quit(): return None
95
# uninitialize the joystick module
97
# Uninitialize the joystick module. After you call this any existing
98
# joystick objects will no longer work.
100
# It is safe to call this function more than once.
104
################################################################################
106
if __name__ == '__main__':