Commits

illume committed 9a174f8

Added a few test files for different modules.

Mostly just testing they import at this stage.

Need to improve them, but at least importing is still of use.

Comments (0)

Files changed (4)

+import unittest
+import pygame
+
+
+class KeyTest (unittest.TestCase):
+
+    def test_import(self):
+        'does it import'
+        import pygame.key
+
+
+    def test_get_repeat(self):
+        delay, interval = pygame.key.get_repeat()
+
+    def test_add_more_tests(self):
+        'we need to add more tests'
+        pass
+        #raise NotImplementedError("TODO: key tests need improving.")
+
+
+
+if __name__ == '__main__':
+    unittest.main()
+
+import unittest
+import pygame, pygame.movie
+
+
+class MovieTest( unittest.TestCase ):
+    
+    def test_load_movie( self ):
+        """ 
+        """
+
+
+    def test_import(self):
+        'does it import'
+        import pygame.movie
+
+    def test_add_more_tests(self):
+        'we need to add more tests'
+        pass
+        #raise NotImplementedError("TODO: movie tests need improving.")
+
+if __name__ == '__main__':
+    unittest.main()

test/sndarray_test.py

+import unittest
+import pygame
+
+
+class SndarrayTest (unittest.TestCase):
+
+    def test_import(self):
+        'does it import'
+        import pygame.sndarray
+
+
+
+    def test_add_more_tests(self):
+        'we need to add more tests'
+        pass
+        #raise NotImplementedError("TODO: sndarray tests need improving.")
+
+
+
+if __name__ == '__main__':
+    unittest.main()

test/surfarray_test.py

+import unittest
+import pygame
+
+
+class SurfarrayTest (unittest.TestCase):
+
+    def test_import(self):
+        'does it import'
+        import pygame.surfarray
+
+    def test_setpixel(self):
+        'Can a pixel be set'
+
+
+
+    def test_add_more_tests(self):
+        'we need to add more tests'
+        pass
+        #raise NotImplementedError("TODO: surfarray tests need improving.")
+
+
+
+if __name__ == '__main__':
+    unittest.main()