Anonymous avatar Anonymous committed e26a2fd

Fixed up the unit test slightly, as an example of how to use the movie
module.

Comments (0)

Files changed (1)

test/_movie_test.py

 ################################### CONSTANTS ##################################
 filename = "War3.avi"
 
-"""
-	(1) init(filename), init(file-like object), init(filename, surface), init(file-like object, surface)	
-	(1) play(int loops) if loops<0, infinite play.
-	(1) stop
-	(1) pause
-	(1) rewind(), (2) rewind(time_pos)
-    (1) surface member, which refers to which surface to place an overlay on. 
-    (1) playing member, true or false
-    (1) paused member, true or false
-    (1) _dealloc
-    streams member list, with Stream objects
-		(1) Stream
-		(1) play(int loops) if loops<0, infinite play.
-		(1) pause
-		(1) stop
-		(1) rewind(), (2) rewind(time_pos) <- rewinds to time-pos, accepts a float, does not guarantee exact positioning.
-        (1) type()->audio, Movie, or subtitle
-"""
 
 class MovieTypeTest( unittest.TestCase ): 
     def test_init(self):     
         pygame.display.init()    
         pygame.mixer.quit()
         movie_file = trunk_relative_path('examples/data/blue.mpg')
-        movie = gmovie.Movie(filename)
+        movie = gmovie.Movie(movie_file)
         self.assertEqual(movie, True)
-        
+
         #screen = pygame.display.get_surface()
         #movie = pygame.gmovie.Movie(filename, screen)
         #self.assertEqual(movie, True)
         pygame.display.init()
         pygame.mixer.quit()
         movie_file = trunk_relative_path('examples/data/blue.mpg')
-        movie = gmovie.Movie(filename)
+        movie = gmovie.Movie(movie_file)
         
         self.assertEqual(movie.playing, False)
 
         pygame.display.init()
         pygame.mixer.quit()
         movie_file = trunk_relative_path('examples/data/blue.mpg')
-        movie = gmovie.Movie(filename)
+        movie = gmovie.Movie(movie_file)
         
         self.assertEqual(movie.playing, False)
         movie.play(-1)
         pygame.display.init()
         pygame.mixer.quit()
         movie_file = trunk_relative_path('examples/data/blue.mpg')
-        movie = gmovie.Movie(filename)
+        movie = gmovie.Movie(movie_file)
         
         movie.play(-1)
         time.sleep(2)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.