Anonymous avatar Anonymous committed f369135

Made all unimplemented tests use todo_test_xxxx naming and updated the __doc__'s. Run's only implemented tests by default.

Comments (0)

Files changed (30)

test/base_test.py

         self.assertEqual(init_called, 1)
         self.assertEqual(quit_called, 1)
 
-    def test_get_error(self):
-
-        # __doc__ (as of 2008-06-25) for pygame.base.get_error:
-
-          # pygame.get_error(): return errorstr
-          # get the current error message
-
-        self.assert_(test_not_implemented())
-
     def test_get_sdl_byteorder(self):
 
         # __doc__ (as of 2008-06-25) for pygame.base.get_sdl_byteorder:
 
         self.assert_( len(pygame.get_sdl_version()) == 3) 
 
-    def test_init(self):
-        return
-
-        # __doc__ (as of 2008-06-25) for pygame.base.init:
-
-          # pygame.init(): return (numpass, numfail)
-          # initialize all imported pygame modules
-
-        self.assert_(test_not_implemented()) 
-
     def not_init_assertions(self):
         self.assert_(not pygame.display.get_init(),  "display shouldn't be initialized" )
         self.assert_(not pygame.mixer.get_init(),  "mixer shouldn't be initialized" )
         self.assert_(pygame.mixer.get_init())
         self.assert_(pygame.font.get_init())
 
-    def test_quit__and_init(self):
-        return # TODO
-
+    def todo_test_quit__and_init(self):
         # __doc__ (as of 2008-06-25) for pygame.base.quit:
 
           # pygame.quit(): return None
 
         self.assert_(quit_hook_ran)
 
-    def test_segfault(self):
+    def todo_test_get_error(self):
 
-        # __doc__ (as of 2008-06-25) for pygame.base.segfault:
+        # __doc__ (as of 2008-08-02) for pygame.base.get_error:
+
+          # pygame.get_error(): return errorstr
+          # get the current error message
+          # 
+          # SDL maintains an internal error message. This message will usually
+          # be given to you when pygame.error is raised. You will rarely need to
+          # call this function.
+          # 
+
+        self.fail() 
+
+    def todo_test_init(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.base.init:
+
+          # pygame.init(): return (numpass, numfail)
+          # initialize all imported pygame modules
+          # 
+          # Initialize all imported Pygame modules. No exceptions will be raised
+          # if a module fails, but the total number if successful and failed
+          # inits will be returned as a tuple. You can always initialize
+          # individual modules manually, but pygame.init is a convenient way to
+          # get everything started. The init() functions for individual modules
+          # will raise exceptions when they fail.
+          # 
+          # You may want to initalise the different modules seperately to speed
+          # up your program or to not use things your game does not.
+          # 
+          # It is safe to call this init() more than once: repeated calls will
+          # have no effect. This is true even if you have pygame.quit() all the
+          # modules.
+          # 
+
+        self.fail() 
+
+    def todo_test_segfault(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.base.segfault:
 
           # crash
 
-        self.assert_(test_not_implemented()) 
+        self.fail() 
 
 if __name__ == '__main__':
     unittest.main()

test/bufferproxy_test.py

 import test.unittest as unittest
 from test_utils import test_not_implemented
 
+import pygame
+
 ################################################################################
 
 class BufferProxyTypeTest(unittest.TestCase):
-    def test_write(self):
+    def test_creation(self):
+        self.assert_(pygame.bufferproxy.BufferProxy())
 
-        # __doc__ (as of 2008-06-25) for pygame.bufferproxy.BufferProxy.write:
+    def todo_test_length(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.bufferproxy.BufferProxy.length:
+
+          # The size of the buffer data in bytes.
+
+        self.fail() 
+
+    def todo_test_raw(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.bufferproxy.BufferProxy.raw:
+
+          # The raw buffer data as string. The string may contain NUL bytes.
+
+        self.fail() 
+
+    def todo_test_write(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.bufferproxy.BufferProxy.write:
 
           # B.write (bufferproxy, buffer, offset) -> None
           # 
           # If the length of the passed buffer exceeds the length of the
           # BufferProxy (reduced by the offset), an IndexError will be raised.
 
-        self.assert_(test_not_implemented()) 
-
-
+        self.fail() 
+        
 ################################################################################
 
 if __name__ == '__main__':
-    unittest.main()
+    unittest.main()

test/cdrom_test.py

 class CdromModuleTest(unittest.TestCase):
     def todo_test_CD(self):
 
-        # __doc__ (as of 2008-06-25) for pygame.cdrom.CD:
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.CD:
 
           # pygame.cdrom.CD(id): return CD
           # class to manage a cdrom drive
+          # 
+          # You can create a CD object for each cdrom on the system. Use
+          # pygame.cdrom.get_count() to determine how many drives actually
+          # exist. The id argument is an integer of the drive, starting at zero.
+          # 
+          # The CD object is not initialized, you can only call CD.get_id() and
+          # CD.get_name() on an uninitialized drive.
+          # 
+          # It is safe to create multiple CD objects for the same drive, they
+          # will all cooperate normally.
+          # 
 
-        self.fail()
+        self.fail() 
 
     def todo_test_get_count(self):
 
-
-        # __doc__ (as of 2008-06-25) for pygame.cdrom.get_count:
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.get_count:
 
           # pygame.cdrom.get_count(): return count
           # number of cd drives on the system
+          # 
+          # Return the number of cd drives on the system. When you create CD
+          # objects you need to pass an integer id that must be lower than this
+          # count. The count will be 0 if there are no drives on the system.
+          # 
 
-        self.fail()
+        self.fail() 
 
     def todo_test_get_init(self):
 
-
-        # __doc__ (as of 2008-06-25) for pygame.cdrom.get_init:
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.get_init:
 
           # pygame.cdrom.get_init(): return bool
           # true if the cdrom module is initialized
+          # 
+          # Test if the cdrom module is initialized or not. This is different
+          # than the CD.init() since each drive must also be initialized
+          # individually.
+          # 
 
-        self.fail()
+        self.fail() 
 
     def todo_test_init(self):
 
-
-        # __doc__ (as of 2008-06-25) for pygame.cdrom.init:
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.init:
 
           # pygame.cdrom.init(): return None
           # initialize the cdrom module
+          # 
+          # Initialize the cdrom module. This will scan the system for all CD
+          # devices. The module must be initialized before any other functions
+          # will work. This automatically happens when you call pygame.init().
+          # 
+          # It is safe to call this function more than once. 
 
-        self.fail()
+        self.fail() 
 
     def todo_test_quit(self):
 
-
-        # __doc__ (as of 2008-06-25) for pygame.cdrom.quit:
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.quit:
 
           # pygame.cdrom.quit(): return None
           # uninitialize the cdrom module
+          # 
+          # Uninitialize the cdrom module. After you call this any existing CD
+          # objects will no longer work.
+          # 
+          # It is safe to call this function more than once. 
 
-        self.fail()
+        self.fail() 
 
 class CDTypeTest(unittest.TestCase):
     def setUp(self):
         pygame.cdrom.init()
 
+        #TODO:
         try:
             self.cd = pygame.cdrom.CD(0)
         except pygame.error:
     
             prompt("Please close the cd drive")
 
-        # self.assert_(test_not_implemented())
-
-    def todo_test_get_all(self):
-
-
-        # __doc__ (as of 2008-07-02) for pygame.cdrom.CD.get_all:
-
-          # CD.get_all(): return [(audio, start, end, lenth), ...]
-          # get all track information
-        
-        # self.cd.init()
-        
-        self.fail()
-
-    def todo_test_get_busy(self):
-
-
-        # __doc__ (as of 2008-07-02) for pygame.cdrom.CD.get_busy:
-
-          # CD.get_busy(): return bool
-          # true if the drive is playing audio
-
-        self.fail()
-
-    def todo_test_get_current(self):
-
-
-        # __doc__ (as of 2008-07-02) for pygame.cdrom.CD.get_current:
-
-          # CD.get_current(): return track, seconds
-          # the current audio playback position
-
-        self.fail()
-
-    def todo_test_get_empty(self):
-
-
-        # __doc__ (as of 2008-07-02) for pygame.cdrom.CD.get_empty:
-
-          # CD.get_empty(): return bool
-          # False if a cdrom is in the drive
-
-        self.fail()
-
-    def todo_test_get_id(self):
-
-
-        # __doc__ (as of 2008-07-02) for pygame.cdrom.CD.get_id:
-
-          # CD.get_init(): return bool
-          # true if this cd device initialized
-
-        self.fail()
-
-    def todo_test_get_init(self):
-
-
-        # __doc__ (as of 2008-07-02) for pygame.cdrom.CD.get_init:
-
-          # CD.get_init(): return bool
-          # true if this cd device initialized
-
-        self.fail()
-
     def test_2_get_name(self):
 
         # __doc__ (as of 2008-07-02) for pygame.cdrom.CD.get_name:
                 question('Is %s the correct name for the cd drive?' % cd_name)
             )
 
+    def todo_test_get_all(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.CD.get_all:
+
+          # CD.get_all(): return [(audio, start, end, lenth), ...]
+          # get all track information
+          # 
+          # Return a list with information for every track on the cdrom. The
+          # information consists of a tuple with four values. The audio value is
+          # True if the track contains audio data. The start, end, and length
+          # values are floating point numbers in seconds. Start and end
+          # represent absolute times on the entire disc.
+          # 
+
+        self.fail() 
+
+    def todo_test_get_busy(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.CD.get_busy:
+
+          # CD.get_busy(): return bool
+          # true if the drive is playing audio
+          # 
+          # Returns True if the drive busy playing back audio. 
+
+        self.fail() 
+
+    def todo_test_get_current(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.CD.get_current:
+
+          # CD.get_current(): return track, seconds
+          # the current audio playback position
+          # 
+          # Returns both the current track and time of that track. This method
+          # works when the drive is either playing or paused.
+          # 
+          # Note, track 0 is the first track on the CD.  Track numbers start at zero. 
+
+        self.fail() 
+
+    def todo_test_get_empty(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.CD.get_empty:
+
+          # CD.get_empty(): return bool
+          # False if a cdrom is in the drive
+          # 
+          # Return False if there is a cdrom currently in the drive. If the
+          # drive is empty this will return True.
+          # 
+
+        self.fail() 
+
+    def todo_test_get_id(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.CD.get_id:
+
+          # CD.get_init(): return bool
+          # true if this cd device initialized
+          # 
+          # Returns the integer id that was used to create the CD instance. This
+          # method can work on an uninitialized CD.
+          # 
+
+        self.fail() 
+
+    def todo_test_get_init(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.CD.get_init:
+
+          # CD.get_init(): return bool
+          # true if this cd device initialized
+          # 
+          # Test if this CDROM device is initialized. This is different than the
+          # pygame.cdrom.init() since each drive must also be initialized
+          # individually.
+          # 
+
+        self.fail() 
+
     def todo_test_get_numtracks(self):
 
-
-        # __doc__ (as of 2008-07-02) for pygame.cdrom.CD.get_numtracks:
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.CD.get_numtracks:
 
           # CD.get_numtracks(): return count
           # the number of tracks on the cdrom
+          # 
+          # Return the number of tracks on the cdrom in the drive. This will
+          # return zero of the drive is empty or has no tracks.
+          # 
 
-        self.fail()
+        self.fail() 
 
     def todo_test_get_paused(self):
 
-
-        # __doc__ (as of 2008-07-02) for pygame.cdrom.CD.get_paused:
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.CD.get_paused:
 
           # CD.get_paused(): return bool
           # true if the drive is paused
+          # 
+          # Returns True if the drive is currently paused. 
 
-        self.fail()
+        self.fail() 
 
     def todo_test_get_track_audio(self):
 
-
-        # __doc__ (as of 2008-07-02) for pygame.cdrom.CD.get_track_audio:
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.CD.get_track_audio:
 
           # CD.get_track_audio(track): return bool
           # true if the cdrom track has audio data
+          # 
+          # Determine if a track on a cdrom contains audio data. You can also
+          # call CD.num_tracks() and CD.get_all() to determine more information
+          # about the cdrom.
+          # 
+          # Note, track 0 is the first track on the CD.  Track numbers start at zero. 
 
-        self.fail()
+        self.fail() 
 
     def todo_test_get_track_length(self):
 
-
-        # __doc__ (as of 2008-07-02) for pygame.cdrom.CD.get_track_length:
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.CD.get_track_length:
 
           # CD.get_track_length(track): return seconds
           # length of a cdrom track
+          # 
+          # Return a floating point value in seconds of the length of the cdrom track. 
+          # Note, track 0 is the first track on the CD.  Track numbers start at zero. 
 
-        self.fail()
+        self.fail() 
 
     def todo_test_get_track_start(self):
 
-
-        # __doc__ (as of 2008-07-02) for pygame.cdrom.CD.get_track_start:
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.CD.get_track_start:
 
           # CD.get_track_start(track): return seconds
           # start time of a cdrom track
+          # 
+          # Return the absolute time in seconds where at start of the cdrom track. 
+          # Note, track 0 is the first track on the CD.  Track numbers start at zero. 
 
-        self.fail()
+        self.fail() 
 
     def todo_test_init(self):
 
-
-        # __doc__ (as of 2008-07-02) for pygame.cdrom.CD.init:
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.CD.init:
 
           # CD.init(): return None
           # initialize a cdrom drive for use
+          # 
+          # Initialize the cdrom drive for use. The drive must be initialized
+          # for most CD methods to work.  Even if the rest of pygame has been
+          # initialized.
+          # 
+          # There may be a brief pause while the drive is initialized. Avoid
+          # CD.init() if the program should not stop for a second or two.
+          # 
 
-        self.fail()
+        self.fail() 
 
     def todo_test_pause(self):
 
-
-        # __doc__ (as of 2008-07-02) for pygame.cdrom.CD.pause:
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.CD.pause:
 
           # CD.pause(): return None
           # temporarily stop audio playback
+          # 
+          # Temporarily stop audio playback on the CD. The playback can be
+          # resumed at the same point with the CD.resume() method. If the CD is
+          # not playing this method does nothing.
+          # 
+          # Note, track 0 is the first track on the CD.  Track numbers start at zero. 
 
-        self.fail()
+        self.fail() 
 
     def todo_test_play(self):
 
-
-        # __doc__ (as of 2008-07-02) for pygame.cdrom.CD.play:
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.CD.play:
 
           # CD.init(): return None
           # initialize a cdrom drive for use
+          # 
+          # Playback audio from an audio cdrom in the drive. Besides the track
+          # number argument, you can also pass a starting and ending time for
+          # playback. The start and end time are in seconds, and can limit the
+          # section of an audio track played.
+          # 
+          # If you pass a start time but no end, the audio will play to the end
+          # of the track. If you pass a start time and 'None' for the end time,
+          # the audio will play to the end of the entire disc.
+          # 
+          # See the CD.get_numtracks() and CD.get_track_audio() to find tracks to playback. 
+          # Note, track 0 is the first track on the CD.  Track numbers start at zero. 
 
-        self.fail()
+        self.fail() 
 
     def todo_test_quit(self):
 
-        # __doc__ (as of 2008-07-02) for pygame.cdrom.CD.quit:
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.CD.quit:
 
           # CD.quit(): return None
           # uninitialize a cdrom drive for use
+          # 
+          # Uninitialize a drive for use. Call this when your program will not
+          # be accessing the drive for awhile.
+          # 
 
-        self.fail()
+        self.fail() 
 
     def todo_test_resume(self):
 
-        # __doc__ (as of 2008-07-02) for pygame.cdrom.CD.resume:
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.CD.resume:
 
           # CD.resume(): return None
           # unpause audio playback
+          # 
+          # Unpause a paused CD. If the CD is not paused or already playing,
+          # this method does nothing.
+          # 
 
-        self.fail()
+        self.fail() 
 
     def todo_test_stop(self):
 
-        # __doc__ (as of 2008-07-02) for pygame.cdrom.CD.stop:
+        # __doc__ (as of 2008-08-02) for pygame.cdrom.CD.stop:
 
           # CD.stop(): return None
           # stop audio playback
+          # 
+          # Stops playback of audio from the cdrom. This will also lose the
+          # current playback position. This method does nothing if the drive
+          # isn't already playing audio.
+          # 
 
-        self.fail()
+        self.fail() 
 
 ################################################################################
 

test/cursors_test.py

 
 import test_utils
 import test.unittest as unittest
-from test_utils import test_not_implemented
+from test_utils import test_not_implemented, fixture_path
+
+import pygame
 
 ################################################################################
 
 class CursorsModuleTest(unittest.TestCase):
-    def test_compile(self):
+    def todo_test_compile(self):
 
         # __doc__ (as of 2008-06-25) for pygame.cursors.compile:
 
           # This returns a tuple containing the cursor data and cursor mask
           # data. Both these arguments are used when setting a cursor with
           # pygame.mouse.set_cursor().
-
-        self.assert_(test_not_implemented()) 
+        
+        self.fail()
 
     def test_load_xbm(self):
-
         # __doc__ (as of 2008-06-25) for pygame.cursors.load_xbm:
 
           # pygame.cursors.load_xbm(cursorfile, maskfile) -> cursor_args
           # reads a pair of XBM files into set_cursor arguments
-          # 
+          #
           # Arguments can either be filenames or filelike objects
           # with the readlines method. Not largely tested, but
           # should work with typical XBM files.
 
-        self.assert_(test_not_implemented()) 
+        # Test that load_xbm will take filenames as arguments
+        cursorfile = fixture_path(r"xbm_cursors\white_sizing.xbm")
+        maskfile   = fixture_path(r"xbm_cursors\white_sizing_mask.xbm")
+        cursor = pygame.cursors.load_xbm(cursorfile, maskfile)
+        
+        # Test that load_xbm will take file objects as arguments
+        cursorfile, maskfile = map(file, (cursorfile, maskfile))
+        cursor = pygame.cursors.load_xbm(cursorfile, maskfile)
 
+        # Is it in a format that mouse.set_cursor won't blow up on?
+        pygame.display.init()
+        pygame.mouse.set_cursor(*cursor)
+        pygame.display.quit()
 
 ################################################################################
 
 if __name__ == '__main__':
     unittest.main()
+    
+################################################################################

test/display_test.py

     #10 0x08054e31 in _start ()
 
             """
-    def test_Info(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.Info:
-    
+
+    def todo_test_Info(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.Info:
+
           # pygame.display.Info(): return VideoInfo
           # Create a video display information object
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_flip(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.flip:
-    
-          # pygame.display.flip(): return None
-          # update the full display Surface to the screen
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_get_active(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.get_active:
-    
-          # pygame.display.get_active(): return bool
-          # true when the display is active on the display
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_get_caption(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.get_caption:
-    
-          # pygame.display.get_caption(): return (title, icontitle)
-          # get the current window caption
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_get_driver(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.get_driver:
-    
-          # pygame.display.get_driver(): return name
-          # get the name of the pygame display backend
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_get_init(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.get_init:
-    
-          # pygame.display.get_init(): return bool
-          # true if the display module is initialized
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_get_surface(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.get_surface:
-    
-          # pygame.display.get_surface(): return Surface
-          # get a reference to the currently set display surface
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_get_wm_info(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.get_wm_info:
-    
-          # pygame.display.get_wm_info(): return dict
-          # Get information about the current windowing system
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_gl_get_attribute(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.gl_get_attribute:
-    
-          # pygame.display.gl_get_attribute(flag): return value
-          # get the value for an opengl flag for the current display
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_gl_set_attribute(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.gl_set_attribute:
-    
-          # pygame.display.gl_set_attribute(flag, value): return None
-          # request an opengl display attribute for the display mode
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_iconify(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.iconify:
-    
-          # pygame.display.iconify(): return bool
-          # iconify the display surface
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_init(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.init:
-    
-          # pygame.display.init(): return None
-          # initialize the display module
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_list_modes(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.list_modes:
-    
-          # pygame.display.list_modes(depth=0, flags=pygame.FULLSCREEN): return list
-          # get list of available fullscreen modes
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_mode_ok(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.mode_ok:
-    
-          # pygame.display.mode_ok(size, flags=0, depth=0): return depth
-          # pick the best color depth for a display mode
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_quit(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.quit:
-    
-          # pygame.display.quit(): return None
-          # uninitialize the display module
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_set_caption(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.set_caption:
-    
-          # pygame.display.set_caption(title, icontitle=None): return None
-          # set the current window caption
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_set_gamma(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.set_gamma:
-    
-          # pygame.display.set_gamma(red, green=None, blue=None): return bool
-          # change the hardware gamma ramps
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_set_gamma_ramp(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.set_gamma_ramp:
-    
-          # change the hardware gamma ramps with a custom lookup
-          # pygame.display.set_gamma_ramp(red, green, blue): return bool
-          # set_gamma_ramp(red, green, blue): return bool
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_set_icon(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.set_icon:
-    
-          # pygame.display.set_icon(Surface): return None
-          # change the system image for the display window
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_set_mode(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.set_mode:
-    
-          # pygame.display.set_mode(resolution=(0,0), flags=0, depth=0): return Surface
-          # initialize a window or screen for display
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_set_palette(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.set_palette:
-    
-          # pygame.display.set_palette(palette=None): return None
-          # set the display color palette for indexed displays
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_toggle_fullscreen(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.display.toggle_fullscreen:
-    
-          # pygame.display.toggle_fullscreen(): return bool
-          # switch between fullscreen and windowed displays
-    
-        self.assert_(test_not_implemented()) 
+          # 
+          # Creates a simple object containing several attributes to describe
+          # the current graphics environment. If this is called before
+          # pygame.display.set_mode() some platforms can provide information
+          # about the default display mode. This can also be called after
+          # setting the display mode to verify specific display options were
+          # satisfied. The VidInfo object has several attributes:
+          # 
+          #   hw:         True if the display is hardware accelerated
+          #   wm:         True if windowed display modes can be used
+          #   video_mem:  The megabytes of video memory on the display. This is 0 if unknown
+          #   bitsize:    Number of bits used to store each pixel
+          #   bytesize:   Number of bytes used to store each pixel
+          #   masks:      Four values used to pack RGBA values into pixels
+          #   shifts:     Four values used to pack RGBA values into pixels
+          #   losses:     Four values used to pack RGBA values into pixels
+          #   blit_hw:    True if hardware Surface blitting is accelerated
+          #   blit_hw_CC: True if hardware Surface colorkey blitting is accelerated
+          #   blit_hw_A:  True if hardware Surface pixel alpha blitting is accelerated
+          #   blit_sw:    True if software Surface blitting is accelerated
+          #   blit_sw_CC: True if software Surface colorkey blitting is accelerated
+          #   blit_sw_A:  True if software Surface pixel alpha blitting is acclerated
+          #   current_h, current_h:  Width and height of the current video mode, or of the
+          #     desktop mode if called before the display.set_mode is called.
+          #     (current_h, current_w are available since SDL 1.2.10, and pygame 1.8.0)
+          #     They are -1 on error, or if an old SDL is being used.
 
-    def test_vid_info( self ):
-        """ 
-        """
-        
-        # old test, was disabled so placing reminder
-        self.assert_(test_not_implemented())
+        self.fail()
         
         if 0:
-
+        
             pygame.init()
             inf = pygame.display.Info()
             print "before a display mode has been set"
             print inf
+        
             self.assertNotEqual(inf.current_h, -1)
             self.assertNotEqual(inf.current_w, -1)
             #probably have an older SDL than 1.2.10 if -1.
-
-
+        
             screen = pygame.display.set_mode((100,100))
             inf = pygame.display.Info()
+        
             print inf
+        
             self.assertNotEqual(inf.current_h, -1)
             self.assertEqual(inf.current_h, 100)
             self.assertEqual(inf.current_w, 100)
+        
+            #pygame.quit()
 
-            #pygame.quit()
+    def todo_test_flip(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.flip:
+
+          # pygame.display.flip(): return None
+          # update the full display Surface to the screen
+          # 
+          # This will update the contents of the entire display. If your display
+          # mode is using the flags pygame.HWSURFACE and pygame.DOUBLEBUF, this
+          # will wait for a vertical retrace and swap the surfaces. If you are
+          # using a different type of display mode, it will simply update the
+          # entire contents of the surface.
+          # 
+          # When using an pygame.OPENGL display mode this will perform a gl buffer swap. 
+
+        self.fail() 
+
+    def todo_test_get_active(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.get_active:
+
+          # pygame.display.get_active(): return bool
+          # true when the display is active on the display
+          # 
+          # After pygame.display.set_mode() is called the display Surface will
+          # be visible on the screen. Most windowed displays can be hidden by
+          # the user. If the display Surface is hidden or iconified this will
+          # return False.
+          # 
+
+        self.fail() 
+
+    def todo_test_get_caption(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.get_caption:
+
+          # pygame.display.get_caption(): return (title, icontitle)
+          # get the current window caption
+          # 
+          # Returns the title and icontitle for the display Surface. These will
+          # often be the same value.
+          # 
+
+        self.fail() 
+
+    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 todo_test_get_init(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.get_init:
+
+          # pygame.display.get_init(): return bool
+          # true if the display module is initialized
+          # 
+          # Returns True if the pygame.display module is currently initialized. 
+
+        self.fail() 
+
+    def todo_test_get_surface(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.get_surface:
+
+          # pygame.display.get_surface(): return Surface
+          # get a reference to the currently set display surface
+          # 
+          # Return a reference to the currently set display Surface. If no
+          # display mode has been set this will return None.
+          # 
+
+        self.fail() 
+
+    def todo_test_get_wm_info(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.get_wm_info:
+
+          # pygame.display.get_wm_info(): return dict
+          # Get information about the current windowing system
+          # 
+          # Creates a dictionary filled with string keys. The strings and values
+          # are arbitrarily created by the system. Some systems may have no
+          # information and an empty dictionary will be returned. Most platforms
+          # will return a "window" key with the value set to the system id for
+          # the current display.
+          # 
+          # New with pygame 1.7.1 
+
+        self.fail() 
+
+    def todo_test_gl_get_attribute(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.gl_get_attribute:
+
+          # pygame.display.gl_get_attribute(flag): return value
+          # get the value for an opengl flag for the current display
+          # 
+          # After calling pygame.display.set_mode() with the pygame.OPENGL flag,
+          # it is a good idea to check the value of any requested OpenGL
+          # attributes. See pygame.display.gl_set_attribute() for a list of
+          # valid flags.
+          # 
+
+        self.fail() 
+
+    def todo_test_gl_set_attribute(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.gl_set_attribute:
+
+          # pygame.display.gl_set_attribute(flag, value): return None
+          # request an opengl display attribute for the display mode
+          # 
+          # When calling pygame.display.set_mode() with the pygame.OPENGL flag,
+          # Pygame automatically handles setting the OpenGL attributes like
+          # color and doublebuffering. OpenGL offers several other attributes
+          # you may want control over. Pass one of these attributes as the flag,
+          # and its appropriate value. This must be called before
+          # pygame.display.set_mode()
+          # 
+          # The OPENGL flags are; 
+          #   GL_ALPHA_SIZE, GL_DEPTH_SIZE, GL_STENCIL_SIZE, GL_ACCUM_RED_SIZE,
+          #   GL_ACCUM_GREEN_SIZE,  GL_ACCUM_BLUE_SIZE, GL_ACCUM_ALPHA_SIZE,
+          #   GL_MULTISAMPLEBUFFERS, GL_MULTISAMPLESAMPLES, GL_STEREO
+
+        self.fail() 
+
+    def todo_test_iconify(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.iconify:
+
+          # pygame.display.iconify(): return bool
+          # iconify the display surface
+          # 
+          # Request the window for the display surface be iconified or hidden.
+          # Not all systems and displays support an iconified display. The
+          # function will return True if successfull.
+          # 
+          # When the display is iconified pygame.display.get_active() will
+          # return False. The event queue should receive a ACTIVEEVENT event
+          # when the window has been iconified.
+          # 
+
+        self.fail() 
+
+    def todo_test_init(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.init:
+
+          # pygame.display.init(): return None
+          # initialize the display module
+          # 
+          # Initializes the pygame display module. The display module cannot do
+          # anything until it is initialized. This is usually handled for you
+          # automatically when you call the higher level pygame.init().
+          # 
+          # Pygame will select from one of several internal display backends
+          # when it is initialized. The display mode will be chosen depending on
+          # the platform and permissions of current user. Before the display
+          # module is initialized the environment variable SDL_VIDEODRIVER can
+          # be set to control which backend is used. The systems with multiple
+          # choices are listed here.
+          # 
+          #    Windows : windib, directx
+          #    Unix    : x11, dga, fbcon, directfb, ggi, vgl, svgalib, aalib
+          # On some platforms it is possible to embed the pygame display into an
+          # already existing window. To do this, the environment variable
+          # SDL_WINDOWID must be set to a string containing the window id or
+          # handle. The environment variable is checked when the pygame display
+          # is initialized. Be aware that there can be many strange side effects
+          # when running in an embedded display.
+          # 
+          # It is harmless to call this more than once, repeated calls have no effect. 
+
+        self.fail() 
+
+    def todo_test_list_modes(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.list_modes:
+
+          # pygame.display.list_modes(depth=0, flags=pygame.FULLSCREEN): return list
+          # get list of available fullscreen modes
+          # 
+          # This function returns a list of possible dimensions for a specified
+          # color depth. The return value will be an empty list if no display
+          # modes are available with the given arguments. A return value of -1
+          # means that any requested resolution should work (this is likely the
+          # case for windowed modes). Mode sizes are sorted from biggest to
+          # smallest.
+          # 
+          # If depth is 0, SDL will choose the current/best color depth for the
+          # display. The flags defaults to pygame.FULLSCREEN, but you may need
+          # to add additional flags for specific fullscreen modes.
+          # 
+
+        self.fail() 
+
+    def todo_test_mode_ok(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.mode_ok:
+
+          # pygame.display.mode_ok(size, flags=0, depth=0): return depth
+          # pick the best color depth for a display mode
+          # 
+          # This function uses the same arguments as pygame.display.set_mode().
+          # It is used to depermine if a requested display mode is available. It
+          # will return 0 if the display mode cannot be set. Otherwise it will
+          # return a pixel depth that best matches the display asked for.
+          # 
+          # Usually the depth argument is not passed, but some platforms can
+          # support multiple display depths. If passed it will hint to which
+          # depth is a better match.
+          # 
+          # The most useful flags to pass will be pygame.HWSURFACE,
+          # pygame.DOUBLEBUF, and maybe pygame.FULLSCREEN. The function will
+          # return 0 if these display flags cannot be set.
+          # 
+
+        self.fail() 
+
+    def todo_test_quit(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.quit:
+
+          # pygame.display.quit(): return None
+          # uninitialize the display module
+          # 
+          # This will shut down the entire display module. This means any active
+          # displays will be closed. This will also be handled automatically
+          # when the program exits.
+          # 
+          # It is harmless to call this more than once, repeated calls have no effect. 
+
+        self.fail() 
+
+    def todo_test_set_caption(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.set_caption:
+
+          # pygame.display.set_caption(title, icontitle=None): return None
+          # set the current window caption
+          # 
+          # If the display has a window title, this function will change the
+          # name on the window. Some systems support an alternate shorter title
+          # to be used for minimized displays.
+          # 
+
+        self.fail() 
+
+    def todo_test_set_gamma(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.set_gamma:
+
+          # pygame.display.set_gamma(red, green=None, blue=None): return bool
+          # change the hardware gamma ramps
+          # 
+          # Set the red, green, and blue gamma values on the display hardware.
+          # If the green and blue arguments are not passed, they will both be
+          # the same as red. Not all systems and hardware support gamma ramps,
+          # if the function succeeds it will return True.
+          # 
+          # A gamma value of 1.0 creates a linear color table. Lower values will
+          # darken the display and higher values will brighten.
+          # 
+
+        self.fail() 
+
+    def todo_test_set_gamma_ramp(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.set_gamma_ramp:
+
+          # change the hardware gamma ramps with a custom lookup
+          # pygame.display.set_gamma_ramp(red, green, blue): return bool
+          # set_gamma_ramp(red, green, blue): return bool
+          # 
+          # Set the red, green, and blue gamma ramps with an explicit lookup
+          # table. Each argument should be sequence of 256 integers. The
+          # integers should range between 0 and 0xffff. Not all systems and
+          # hardware support gamma ramps, if the function succeeds it will
+          # return True.
+          # 
+
+        self.fail() 
+
+    def todo_test_set_icon(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.set_icon:
+
+          # pygame.display.set_icon(Surface): return None
+          # change the system image for the display window
+          # 
+          # Sets the runtime icon the system will use to represent the display
+          # window. All windows default to a simple pygame logo for the window
+          # icon.
+          # 
+          # You can pass any surface, but most systems want a smaller image
+          # around 32x32. The image can have colorkey transparency which will be
+          # passed to the system.
+          # 
+          # Some systems do not allow the window icon to change after it has
+          # been shown. This function can be called before
+          # pygame.display.set_mode() to create the icon before the display mode
+          # is set.
+          # 
+
+        self.fail() 
+
+    def todo_test_set_mode(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.set_mode:
+
+          # pygame.display.set_mode(resolution=(0,0), flags=0, depth=0): return Surface
+          # initialize a window or screen for display
+          # 
+          # This function will create a display Surface. The arguments passed in
+          # are requests for a display type. The actual created display will be
+          # the best possible match supported by the system.
+          # 
+          # The resolution argument is a pair of numbers representing the width
+          # and height. The flags argument is a collection of additional
+          # options.  The depth argument represents the number of bits to use
+          # for color.
+          # 
+          # The Surface that gets returned can be drawn to like a regular
+          # Surface but changes will eventually be seen on the monitor.
+          # 
+          # If no resolution is passed or is set to (0, 0) and pygame uses SDL
+          # version 1.2.10 or above, the created Surface will have the same size
+          # as the current screen resolution. If only the width or height are
+          # set to 0, the Surface will have the same width or height as the
+          # screen resolution. Using a SDL version prior to 1.2.10 will raise an
+          # exception.
+          # 
+          # It is usually best to not pass the depth argument. It will default
+          # to the best and fastest color depth for the system. If your game
+          # requires a specific color format you can control the depth with this
+          # argument. Pygame will emulate an unavailable color depth which can
+          # be slow.
+          # 
+          # When requesting fullscreen display modes, sometimes an exact match
+          # for the requested resolution cannot be made. In these situations
+          # pygame will select the closest compatable match. The returned
+          # surface will still always match the requested resolution.
+          # 
+          # The flags argument controls which type of display you want. There
+          # are several to choose from, and you can even combine multiple types
+          # using the bitwise or operator, (the pipe "|" character). If you pass
+          # 0 or no flags argument it will default to a software driven window.
+          # Here are the display flags you will want to choose from:
+          # 
+          #    pygame.FULLSCREEN    create a fullscreen display
+          #    pygame.DOUBLEBUF     recommended for HWSURFACE or OPENGL
+          #    pygame.HWSURFACE     hardware accelerated, only in FULLSCREEN
+          #    pygame.OPENGL        create an opengl renderable display
+          #    pygame.RESIZABLE     display window should be sizeable
+          #    pygame.NOFRAME       display window will have no border or controls
+
+        self.fail() 
+
+    def todo_test_set_palette(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.set_palette:
+
+          # pygame.display.set_palette(palette=None): return None
+          # set the display color palette for indexed displays
+          # 
+          # This will change the video display color palette for 8bit displays.
+          # This does not change the palette for the actual display Surface,
+          # only the palette that is used to display the Surface. If no palette
+          # argument is passed, the system default palette will be restored. The
+          # palette is a sequence of RGB triplets.
+          # 
+
+        self.fail() 
+
+    def todo_test_toggle_fullscreen(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.display.toggle_fullscreen:
+
+          # pygame.display.toggle_fullscreen(): return bool
+          # switch between fullscreen and windowed displays
+          # 
+          # Switches the display window between windowed and fullscreen modes.
+          # This function only works under the unix x11 video driver. For most
+          # situations it is better to call pygame.display.set_mode() with new
+          # display flags.
+          # 
+
+        self.fail() 
 
 if __name__ == '__main__':
     unittest.main()

test/draw_test.py

         for pt in test_utils.rect_outer_bounds(drawn):
             self.assert_(self.surf.get_at(pt) != self.color)
 
-        
-    def test_aaline(self):
-        # __doc__ (as of 2008-06-25) for pygame.draw.aaline:
+    def todo_test_aaline(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.draw.aaline:
 
           # pygame.draw.aaline(Surface, color, startpos, endpos, blend=1): return Rect
           # draw fine antialiased lines
+          # 
+          # Draws an anti-aliased line on a surface. This will respect the
+          # clipping rectangle. A bounding box of the affected area is returned
+          # returned as a rectangle. If blend is true, the shades will be be
+          # blended with existing pixel shades instead of overwriting them. This
+          # function accepts floating point values for the end points.
+          # 
 
-        self.assert_(test_not_implemented()) 
+        self.fail() 
 
-    def test_aalines(self):
+    def todo_test_aalines(self):
 
-        # __doc__ (as of 2008-06-25) for pygame.draw.aalines:
+        # __doc__ (as of 2008-08-02) for pygame.draw.aalines:
 
           # pygame.draw.aalines(Surface, color, closed, pointlist, blend=1): return Rect
+          # 
+          # Draws a sequence on a surface. You must pass at least two points in
+          # the sequence of points. The closed argument is a simple boolean and
+          # if true, a line will be draw between the first and last points. The
+          # boolean blend argument set to true will blend the shades with
+          # existing shades instead of overwriting them. This function accepts
+          # floating point values for the end points.
+          # 
 
-        self.assert_(test_not_implemented()) 
+        self.fail() 
 
-    def test_arc(self):
+    def todo_test_arc(self):
 
-        # __doc__ (as of 2008-06-25) for pygame.draw.arc:
+        # __doc__ (as of 2008-08-02) for pygame.draw.arc:
 
-          # pygame.draw.arc(Surface, color, Rect, start_angle, stop_angle, width=1): return Rect
+          # pygame.draw.arc(Surface, color, Rect, start_angle, stop_angle,
+          # width=1): return Rect
+          # 
           # draw a partial section of an ellipse
+          # 
+          # Draws an elliptical arc on the Surface. The rect argument is the
+          # area that the ellipse will fill. The two angle arguments are the
+          # initial and final angle in radians, with the zero on the right. The
+          # width argument is the thickness to draw the outer edge.
+          # 
 
-        self.assert_(test_not_implemented()) 
+        self.fail() 
 
-    def test_circle(self):
-        # __doc__ (as of 2008-06-25) for pygame.draw.circle:
+    def todo_test_circle(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.draw.circle:
 
           # pygame.draw.circle(Surface, color, pos, radius, width=0): return Rect
           # draw a circle around a point
+          # 
+          # Draws a circular shape on the Surface. The pos argument is the
+          # center of the circle, and radius is the size. The width argument is
+          # the thickness to draw the outer edge. If width is zero then the
+          # circle will be filled.
+          # 
 
-        self.assert_(test_not_implemented()) 
+        self.fail() 
 
-    def test_ellipse(self):
+    def todo_test_ellipse(self):
 
-        # __doc__ (as of 2008-06-25) for pygame.draw.ellipse:
+        # __doc__ (as of 2008-08-02) for pygame.draw.ellipse:
 
           # pygame.draw.ellipse(Surface, color, Rect, width=0): return Rect
           # draw a round shape inside a rectangle
+          # 
+          # Draws an elliptical shape on the Surface. The given rectangle is the
+          # area that the circle will fill. The width argument is the thickness
+          # to draw the outer edge. If width is zero then the ellipse will be
+          # filled.
+          # 
 
-        self.assert_(test_not_implemented()) 
-        
-    def test_lines(self):
+        self.fail() 
 
-        # __doc__ (as of 2008-06-25) for pygame.draw.lines:
+    def todo_test_lines(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.draw.lines:
 
           # pygame.draw.lines(Surface, color, closed, pointlist, width=1): return Rect
           # draw multiple contiguous line segments
+          # 
+          # Draw a sequence of lines on a Surface. The pointlist argument is a
+          # series of points that are connected by a line. If the closed
+          # argument is true an additional line segment is drawn between the
+          # first and last points.
+          # 
+          # This does not draw any endcaps or miter joints. Lines with sharp
+          # corners and wide line widths can have improper looking corners.
+          # 
 
-        self.assert_(test_not_implemented())
+        self.fail() 
 
-    def test_polygon(self):
-        # __doc__ (as of 2008-06-25) for pygame.draw.polygon:
+    def todo_test_polygon(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.draw.polygon:
 
           # pygame.draw.polygon(Surface, color, pointlist, width=0): return Rect
           # draw a shape with any number of sides
+          # 
+          # Draws a polygonal shape on the Surface. The pointlist argument is
+          # the vertices of the polygon. The width argument is the thickness to
+          # draw the outer edge. If width is zero then the polygon will be
+          # filled.
+          # 
+          # For aapolygon, use aalines with the 'closed' parameter. 
 
-        self.assert_(test_not_implemented())
+        self.fail() 
 
 ################################################################################
 
 if __name__ == '__main__':
-    unittest.main()
+    unittest.main()

test/event_test.py

 
 class EventTypeTest(unittest.TestCase):
     def test_Event(self):
-        # __doc__ (as of 2008-06-25) for pygame.event.Event:
+        # __doc__ (as of 2008-08-02) for pygame.event.Event:
 
           # pygame.event.Event(type, dict): return Event
           # pygame.event.Event(type, **attributes): return Event
           # create a new event object
+          # 
+          # Creates a new event with the given type. The event is created with
+          # the given attributes and values. The attributes can come from a
+          # dictionary argument, or as string keys from a dictionary.
+          # 
+          # The given attributes will be readonly attributes on the new event
+          # object itself. These are the only attributes on the Event object,
+          # there are no methods attached to Event objects.
 
         e = pygame.event.Event(pygame.USEREVENT, some_attr=1, other_attr='1')
 
 
     def todo_test_get_blocked(self):
 
-        # __doc__ (as of 2008-06-25) for pygame.event.get_blocked:
+        # __doc__ (as of 2008-08-02) for pygame.event.get_blocked:
 
           # pygame.event.get_blocked(type): return bool
           # test if a type of event is blocked from the queue
+          # 
+          # Returns true if the given event type is blocked from the queue. 
 
-        self.fail()
+        self.fail() 
+
+    def todo_test_get_grab(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.event.get_grab:
+
+          # pygame.event.get_grab(): return bool
+          # test if the program is sharing input devices
+          # 
+          # Returns true when the input events are grabbed for this application.
+          # Use pygame.event.set_grab() to control this state.
+          # 
+
+        self.fail() 
 
     def todo_test_poll(self):
 
-        # __doc__ (as of 2008-06-25) for pygame.event.poll:
+        # __doc__ (as of 2008-08-02) for pygame.event.poll:
 
           # pygame.event.poll(): return Event
           # get a single event from the queue
+          # 
+          # Returns a single event from the queue. If the event queue is empty
+          # an event of type pygame.NOEVENT will be returned immediately. The
+          # returned event is removed from the queue.
+          # 
 
-        self.fail()
-        
-    def todo_test_set_grab(self):
-
-        # __doc__ (as of 2008-06-25) for pygame.event.set_grab:
-
-          # pygame.event.set_grab(bool): return None
-          # control the sharing of input devices with other applications
-        
-        self.fail()
-
-    def todo_test_get_grab(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.event.get_grab:
-    
-          # pygame.event.get_grab(): return bool
-          # test if the program is sharing input devices
-    
         self.fail() 
 
 ################################################################################

test/fastevent_test.py

 ################################################################################
 
 class FasteventModuleTest(unittest.TestCase):
-    def test_get(self):
-
-        # __doc__ (as of 2008-06-25) for pygame.fastevent.get:
-
+    def todo_test_get(self):
+    
+        # __doc__ (as of 2008-08-02) for pygame.fastevent.get:
+    
           # pygame.fastevent.get() -> list of Events
           # get all events from the queue
-
-        self.assert_(test_not_implemented()) 
-
-    def test_init(self):
-
-        # __doc__ (as of 2008-06-25) for pygame.fastevent.init:
-
+    
+        self.fail() 
+    
+    def todo_test_init(self):
+    
+        # __doc__ (as of 2008-08-02) for pygame.fastevent.init:
+    
           # pygame.fastevent.init() -> None
           # initialize pygame.fastevent.
-
-        self.assert_(test_not_implemented()) 
-
-    def test_poll(self):
-
-        # __doc__ (as of 2008-06-25) for pygame.fastevent.poll:
-
+    
+        self.fail() 
+    
+    def todo_test_poll(self):
+    
+        # __doc__ (as of 2008-08-02) for pygame.fastevent.poll:
+    
           # pygame.fastevent.poll() -> Event
           # get an available event
           # 
           # Returns next event on queue. If there is no event waiting on the
           # queue, this will return an event with type NOEVENT.
-
-        self.assert_(test_not_implemented()) 
-
-    def test_post(self):
-
-        # __doc__ (as of 2008-06-25) for pygame.fastevent.post:
-
+    
+        self.fail() 
+    
+    def todo_test_post(self):
+    
+        # __doc__ (as of 2008-08-02) for pygame.fastevent.post:
+    
           # pygame.fastevent.post(Event) -> None
           # place an event on the queue
           # 
           # event on to a full queue from the thread that processes events.
           # For that reason I do not recommend using this function in the
           # main thread of an SDL program.
-
-        self.assert_(test_not_implemented()) 
-
-    def test_pump(self):
-
-        # __doc__ (as of 2008-06-25) for pygame.fastevent.pump:
-
+    
+        self.fail() 
+    
+    def todo_test_pump(self):
+    
+        # __doc__ (as of 2008-08-02) for pygame.fastevent.pump:
+    
           # pygame.fastevent.pump() -> None
           # update the internal messages
           # 
           # event queue. The main window may need to be repainted. Certain joysticks
           # must be polled for their values. If you fail to make a call to the event
           # queue for too long, the system may decide your program has locked up.
-
-        self.assert_(test_not_implemented()) 
-
-    def test_wait(self):
-
-        # __doc__ (as of 2008-06-25) for pygame.fastevent.wait:
-
+    
+        self.fail() 
+    
+    def todo_test_wait(self):
+    
+        # __doc__ (as of 2008-08-02) for pygame.fastevent.wait:
+    
           # pygame.fastevent.wait() -> Event
           # wait for an event
           # 
           # available. Sometimes it is important to use this wait to get
           # events from the queue, it will allow your application to idle
           # when the user isn't doing anything with it.
-
-        self.assert_(test_not_implemented()) 
-
-
+    
+        self.fail() 
+    
 ################################################################################
 
 if __name__ == '__main__':
-    unittest.main()
+    unittest.main()

test/font_test.py

         s = f.render("", False, [0, 0, 0], [255, 255, 255])
         self.assertEqual(s.get_size()[0], 1)
         #print "fonttest done"
-        #pygame.font.quit ()
+        pygame.font.quit ()
 
-    def test_SysFont(self):
+    def todo_test_SysFont(self):
 
-        # __doc__ (as of 2008-06-25) for pygame.font.SysFont:
+        # __doc__ (as of 2008-08-02) for pygame.font.SysFont:
 
           # pygame.font.SysFont(name, size, bold=False, italic=False) -> Font
           # create a pygame Font from system font resources
           # uses a small set of common font aliases, if the specific
           # font you ask for is not available, a reasonable alternative
           # may be used.
+          # 
+          # Return a new Font object that is loaded from the system fonts. The
+          # font will match the requested bold and italic flags. If a suitable
+          # system font is not found this will fallback on loading the default
+          # pygame font. The font name can be a comma separated list of font
+          # names to look for.
+          # 
 
-        self.assert_(test_not_implemented()) 
+        self.fail() 
 
-    def test_get_default_font(self):
+    def todo_test_get_default_font(self):
 
-        # __doc__ (as of 2008-06-25) for pygame.font.get_default_font:
+        # __doc__ (as of 2008-08-02) for pygame.font.get_default_font:
 
           # pygame.font.get_default_font(): return string
           # get the filename of the default font
+          # 
+          # Return the filename of the system font. This is not the full path to
+          # the file. This file can usually be found in the same directory as
+          # the font module, but it can also be bundled in separate archives.
+          # 
 
-        self.assert_(test_not_implemented()) 
+        self.fail() 
 
-    def test_get_fonts(self):
+    def todo_test_get_fonts(self):
 
-        # __doc__ (as of 2008-06-25) for pygame.font.get_fonts:
+        # __doc__ (as of 2008-08-02) for pygame.font.get_fonts:
 
           # pygame.font.get_fonts() -> list
           # get a list of system font names
           # the names of the fonts will be all lowercase with spaces
           # removed. This is how pygame internally stores the font
           # names for matching.
+          # 
+          # Returns a list of all the fonts available on the system. The names
+          # of the fonts will be set to lowercase with all spaces and
+          # punctuation removed. This works on most systems, but some will
+          # return an empty list if they cannot find fonts.
+          # 
 
-        self.assert_(test_not_implemented()) 
+        self.fail() 
 
-    def test_get_init(self):
+    def todo_test_get_init(self):
 
-        # __doc__ (as of 2008-06-25) for pygame.font.get_init:
+        # __doc__ (as of 2008-08-02) for pygame.font.get_init:
 
           # pygame.font.get_init(): return bool
           # true if the font module is initialized
+          # 
+          # Test if the font module is initialized or not. 
 
-        self.assert_(test_not_implemented()) 
+        self.fail() 
 
-    def test_init(self):
+    def todo_test_init(self):
 
-        # __doc__ (as of 2008-06-25) for pygame.font.init:
+        # __doc__ (as of 2008-08-02) for pygame.font.init:
 
           # pygame.font.init(): return None
           # initialize the font module
+          # 
+          # This method is called automatically by pygame.init(). It initializes
+          # the font module. The module must be initialized before any other
+          # functions will work.
+          # 
+          # It is safe to call this function more than once. 
 
-        self.assert_(test_not_implemented()) 
+        self.fail() 
 
-    def test_match_font(self):
+    def todo_test_match_font(self):
 
-        # __doc__ (as of 2008-06-25) for pygame.font.match_font:
+        # __doc__ (as of 2008-08-02) for pygame.font.match_font:
 
           # pygame.font.match_font(name, bold=0, italic=0) -> name
           # find the filename for the named system font
           # separated list of font names to try.
           # 
           # If no match is found, None is returned.
+          # 
+          # Returns the full path to a font file on the system. If bold or
+          # italic are set to true, this will attempt to find the correct family
+          # of font.
+          # 
+          # The font name can actually be a comma separated list of font names
+          # to try. If none of the given names are found, None is returned.
+          # 
+          # Example: 
+          #     print pygame.font.match_font('bitstreamverasans')
+          #     # output is: /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf
+          #     # (but only if you have Vera on your system)
 
-        self.assert_(test_not_implemented()) 
+        self.fail() 
 
-    def test_quit(self):
+    def todo_test_quit(self):
 
-        # __doc__ (as of 2008-06-25) for pygame.font.quit:
+        # __doc__ (as of 2008-08-02) for pygame.font.quit:
 
           # pygame.font.quit(): return None
           # uninitialize the font module
+          # 
+          # Manually uninitialize SDL_ttf's font system. This is called
+          # automatically by pygame.quit().
+          # 
+          # It is safe to call this function even if font is currently not initialized. 
 
-        self.assert_(test_not_implemented()) 
+        self.fail() 
 
 class FontTypeTest( unittest.TestCase ):
-    def test_get_ascent(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.font.Font.get_ascent:
-    
+    def todo_test_get_ascent(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.font.Font.get_ascent:
+
           # Font.get_ascent(): return int
           # get the ascent of the font
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_get_bold(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.font.Font.get_bold:
-    
+          # 
+          # Return the height in pixels for the font ascent. The ascent is the
+          # number of pixels from the font baseline to the top of the font.
+          # 
+
+        self.fail() 
+
+    def todo_test_get_bold(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.font.Font.get_bold:
+
           # Font.get_bold(): return bool
           # check if text will be rendered bold
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_get_descent(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.font.Font.get_descent:
-    
+          # 
+          # Return True when the font bold rendering mode is enabled. 
+
+        self.fail() 
+
+    def todo_test_get_descent(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.font.Font.get_descent:
+
           # Font.get_descent(): return int
           # get the descent of the font
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_get_height(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.font.Font.get_height:
-    
+          # 
+          # Return the height in pixels for the font descent. The descent is the
+          # number of pixels from the font baseline to the bottom of the font.
+
+        self.fail() 
+
+    def todo_test_get_height(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.font.Font.get_height:
+
           # Font.get_height(): return int
           # get the height of the font
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_get_italic(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.font.Font.get_italic:
-    
+          # 
+          # Return the height in pixels of the actual rendered text. This is the
+          # average size for each glyph in the font.
+
+        self.fail() 
+
+    def todo_test_get_italic(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.font.Font.get_italic:
+
           # Font.get_italic(): return bool
           # check if the text will be rendered italic
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_get_linesize(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.font.Font.get_linesize:
-    
+          # 
+          # Return True when the font italic rendering mode is enabled. 
+
+        self.fail() 
+
+    def todo_test_get_linesize(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.font.Font.get_linesize:
+
           # Font.get_linesize(): return int
           # get the line space of the font text
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_get_underline(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.font.Font.get_underline:
-    
+          # 
+          # Return the height in pixels for a line of text with the font. When
+          # rendering multiple lines of text this is the recommended amount of
+          # space between lines.
+
+        self.fail() 
+
+    def todo_test_get_underline(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.font.Font.get_underline:
+
           # Font.get_underline(): return bool
           # check if text will be rendered with an underline
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_metrics(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.font.Font.metrics:
-    
+          # 
+          # Return True when the font underline is enabled. 
+
+        self.fail() 
+
+    def todo_test_metrics(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.font.Font.metrics:
+
           # Font.metrics(text): return list
           # Gets the metrics for each character in the pased string.
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_render(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.font.Font.render:
-    
+          # 
+          # The list contains tuples for each character, which contain the
+          # minimum X offset, the maximum X offset, the minimum Y offset, the
+          # maximum Y offset and the advance offset (bearing plus width) of the
+          # character. [(minx, maxx, miny, maxy, advance), (minx, maxx, miny,
+          # maxy, advance), ...]
+
+        self.fail() 
+
+    def todo_test_render(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.font.Font.render:
+
           # Font.render(text, antialias, color, background=None): return Surface
           # draw text on a new Surface
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_set_bold(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.font.Font.set_bold:
-    
+          # 
+          # This creates a new Surface with the specified text rendered on it.
+          # Pygame provides no way to directly draw text on an existing Surface:
+          # instead you must use Font.render() to create an image (Surface) of
+          # the text, then blit this image onto another Surface.
+          # 
+          # The text can only be a single line: newline characters are not
+          # rendered. The antialias argument is a boolean: if true the
+          # characters will have smooth edges. The color argument is the color
+          # of the text [e.g.: (0,0,255) for blue]. The optional background
+          # argument is a color to use for the text background. If no background
+          # is passed the area outside the text will be transparent.
+          # 
+          # The Surface returned will be of the dimensions required to hold the
+          # text. (the same as those returned by Font.size()). If an empty
+          # string is passed for the text, a blank surface will be returned that
+          # is one pixel wide and the height of the font.
+          # 
+          # Depending on the type of background and antialiasing used, this
+          # returns different types of Surfaces. For performance reasons, it is
+          # good to know what type of image will be used. If antialiasing is not
+          # used, the return image will always be an 8bit image with a two color
+          # palette. If the background is transparent a colorkey will be set.
+          # Antialiased images are rendered to 24-bit RGB images. If the
+          # background is transparent a pixel alpha will be included.
+          # 
+          # Optimization: if you know that the final destination for the text
+          # (on the screen) will always have a solid background, and the text is
+          # antialiased, you can improve performance by specifying the
+          # background color. This will cause the resulting image to maintain
+          # transparency information by colorkey rather than (much less
+          # efficient) alpha values.
+          # 
+          # If you render '\n' a unknown char will be rendered.  Usually a
+          # rectangle. Instead you need to handle new lines yourself.
+          # 
+          # Font rendering is not thread safe: only a single thread can render
+          # text any time.
+
+        self.fail() 
+
+    def todo_test_set_bold(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.font.Font.set_bold:
+
           # Font.set_bold(bool): return None
           # enable fake rendering of bold text
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_set_italic(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.font.Font.set_italic:
-    
+          # 
+          # Enables the bold rendering of text. This is a fake stretching of the
+          # font that doesn't look good on many font types. If possible load the
+          # font from a real bold font file. While bold, the font will have a
+          # different width than when normal. This can be mixed with the italic
+          # and underline modes.
+
+        self.fail() 
+
+    def todo_test_set_italic(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.font.Font.set_italic:
+
           # Font.set_bold(bool): return None
           # enable fake rendering of italic text
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_set_underline(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.font.Font.set_underline:
-    
+          # 
+          # Enables fake rendering of italic text. This is a fake skewing of the
+          # font that doesn't look good on many font types. If possible load the
+          # font from a real italic font file. While italic the font will have a
+          # different width than when normal. This can be mixed with the bold
+          # and underline modes.
+
+        self.fail() 
+
+    def todo_test_set_underline(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.font.Font.set_underline:
+
           # Font.set_underline(bool): return None
           # control if text is rendered with an underline
-    
-        self.assert_(test_not_implemented()) 
-    
-    def test_size(self):
-    
-        # __doc__ (as of 2008-06-25) for pygame.font.Font.size:
-    
+          # 
+          # When enabled, all rendered fonts will include an underline. The
+          # underline is always one pixel thick, regardless of font size. This
+          # can be mixed with the bold and italic modes.
+
+        self.fail() 
+
+    def todo_test_size(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.font.Font.size:
+
           # Font.size(text): return (width, height)
           # determine the amount of space needed to render text
-    
-        self.assert_(test_not_implemented()) 
+          # 
+          # Returns the dimensions needed to render the text. This can be used
+          # to help determine the positioning needed for text before it is
+          # rendered. It can also be used for wordwrapping and other layout
+          # effects.
+          # 
+          # Be aware that most fonts use kerning which adjusts the widths for
+          # specific letter pairs. For example, the width for "ae" will not
+          # always match the width for "a" + "e".
+
+        self.fail() 
+
 
 if __name__ == '__main__':
     unittest.main()

test/image_test.py

         self.assert_(AreSurfacesIdentical(test_surface, test_to_from_argb_string))
         #"ERROR: image.fromstring and image.tostring with ARGB are not symmetric"
 
-    def test_frombuffer(self):
+    def todo_test_frombuffer(self):
 
-        # __doc__ (as of 2008-06-25) for pygame.image.frombuffer:
+        # __doc__ (as of 2008-08-02) for pygame.image.frombuffer:
 
           # pygame.image.frombuffer(string, size, format): return Surface
           # create a new Surface that shares data inside a string buffer
+          # 
+          # Create a new Surface that shares pixel data directly from the string
+          # buffer. This method takes the same arguments as
+          # pygame.image.fromstring(), but is unable to vertically flip the
+          # source data.
+          # 
+          # This will run much faster than pygame.image.fromstring, since no
+          # pixel data must be allocated and copied.
 
-        self.assert_(test_not_implemented()) 
+        self.fail() 
 
-    def test_get_extended(self):
+    def todo_test_get_extended(self):
 
-        # __doc__ (as of 2008-06-25) for pygame.image.get_extended:
+        # __doc__ (as of 2008-08-02) for pygame.image.get_extended:
 
           # pygame.image.get_extended(): return bool
           # test if extended image formats can be loaded
+          # 
+          # If pygame is built with extended image formats this function will
+          # return True. It is still not possible to determine which formats
+          # will be available, but generally you will be able to load them all.
 
-        self.assert_(test_not_implemented())
+        self.fail() 
 
-    def test_load_basic(self):
+    def todo_test_load_basic(self):
 
-        # __doc__ (as of 2008-06-25) for pygame.image.load_basic:
+        # __doc__ (as of 2008-08-02) for pygame.image.load_basic:
 
           # pygame.image.load(filename): return Surface
           # pygame.image.load(fileobj, namehint=): return Surface
           # load new image from a file
 
-        self.assert_(test_not_implemented()) 
+        self.fail() 
 
-    def test_load_extended(self):
+    def todo_test_load_extended(self):
 
-        # __doc__ (as of 2008-06-25) for pygame.image.load_extended:
+        # __doc__ (as of 2008-08-02) for pygame.image.load_extended:
 
           # pygame module for image transfer
 
-        self.assert_(test_not_implemented()) 
+        self.fail() 
 
-    def test_save_extended(self):
+    def todo_test_save_extended(self):
 
-        # __doc__ (as of 2008-06-25) for pygame.image.save_extended:
+        # __doc__ (as of 2008-08-02) for pygame.image.save_extended:
 
           # pygame module for image transfer
 
-        self.assert_(test_not_implemented()) 
+        self.fail() 
 
 if __name__ == '__main__':
     unittest.main()

test/joystick_test.py

 ################################################################################
 
 class JoystickTypeTest(unittest.TestCase):
-    def test_Joystick(self):
-        # __doc__ (as of 2008-06-25) for pygame.joystick.Joystick:
-    
+    def todo_test_Joystick(self):
+
+        # __doc__ (as of 2008-08-02) for pygame.joystick.Joystick:
+
           # pygame.joystick.Joystick(id): return Joystick
           # create a new Joystick object
+          # 
+          # Create a new joystick to access a physical device. The id argument
+          # must be a value from 0 to pygame.joystick.get_count()-1.
+          # 
+          # To access most of the Joystick methods, you'll need to init() the
+          # Joystick.