Commits

Anonymous committed 02d49ef

removed command line options for individual test_modules, use run_tests.py module --flags to run individual module with options ( fail incomplete etc ). Less conflict with unittest command line parser.

Comments (0)

Files changed (34)

test/base_test.py

     global quit_called
     quit_called = quit_called + 1
 
-
 class BaseModuleTest(unittest.TestCase):
     def testAutoInit(self):
         pygame.init()
 
         self.assert_(test_not_implemented()) 
 
-
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/blit_test.py

 
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/bufferproxy_test.py

 ################################################################################
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/cdrom_test.py

 ################################################################################
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/color_test.py

 ################################################################################
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/cursors_test.py

 ################################################################################
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/display_test.py

             #pygame.quit()
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/draw_test.py

 ################################################################################
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/event_test.py

 ################################################################################
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/fastevent_test.py

 ################################################################################
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/font_test.py

         self.assert_(test_not_implemented()) 
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/image__save_gl_surface_test.py

         
         pygame.display.quit()
 if __name__ == '__main__': 
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/image_test.py

         self.assert_(test_not_implemented()) 
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/joystick_test.py

 ################################################################################
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()
-import unittest
+import unittest, os
 
 import test_utils
 from test_utils import test_not_implemented
 
           # pygame.key.get_focused(): return bool
           # true if the display is receiving keyboard input from the system
-
+        
         self.assert_(test_not_implemented()) 
 
     def test_get_mods(self):
 
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/mask_test.py

 if __name__ == '__main__':
 
     if 1:
-        test_utils.get_command_line_options()
-        #unittest.main()()
+        unittest.main()
     else:
         mask_from_surface = maskFromSurface
 

test/mixer_music_test.py

             #musf = open(musfn)
             #pygame.mixer.music.load(musf)
         pygame.mixer.quit()
-    
-    
+        
     def test_queue(self):
 
         # __doc__ (as of 2008-07-13) for pygame.mixer_music.queue:

test/mixer_test.py

 ##################################### MAIN #####################################
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/mouse_test.py

 ################################################################################
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/movie_test.py

         self.assert_(test_not_implemented()) 
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/overlay_test.py

 ################################################################################
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/pixelarray_test.py

         #print "extract end"
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/rect_test.py

         self.assertRaises(ValueError, rect_list.remove, r2)
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/scrap_test.py

     pygame.init ()
     pygame.display.set_mode ((1, 1))
     scrap.init ()
-    #unittest.main()()
+    #unittest.main()

test/sndarray_test.py

 
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/sprite_test.py

 ################################################################################
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/surface_test.py

 
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/surfarray_test.py

 
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/surflock_test.py

         #print "test_surfarray_ref - end"
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/sysfont_test.py

 ################################################################################
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/test_utils.py

 def test_not_implemented():
     return not fail_incomplete_tests
 
-def check_option(*args):
-    # Remove the flags or it will mess up unittest cmd line arg parser
-    for arg in args:
-        if arg in sys.argv:
-            del sys.argv[sys.argv.index(arg)]
-            return True
-
-def get_command_line_options():
-    global fail_incomplete_tests
-    if check_option("--incomplete", "-i"):  fail_incomplete_tests = 1
-    
-    unittest.main()
-
 ################################## TEMP FILES ##################################
 
 def get_tmp_dir():

test/threads_test.py

 ################################################################################
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/time_test.py

 ################################################################################
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()

test/transform_test.py

         self.assert_(test_not_implemented()) 
 
 if __name__ == '__main__':
-    test_utils.get_command_line_options()
-    #unittest.main()()
+    unittest.main()