pitivi r1367 - trunk/tests



Author: edwardrv
Date: Fri Nov 28 16:49:57 2008
New Revision: 1367
URL: http://svn.gnome.org/viewvc/pitivi?rev=1367&view=rev

Log:
tests/common : Fix FileSourceFactory for default_duration modifications

Modified:
   trunk/tests/common.py

Modified: trunk/tests/common.py
==============================================================================
--- trunk/tests/common.py	(original)
+++ trunk/tests/common.py	Fri Nov 28 16:49:57 2008
@@ -123,6 +123,21 @@
         TestObjectFactory.__init__(self, *args, **kwargs)
         self.length = duration
 
+    def _getDefaultDuration(self):
+        """
+        Returns the default duration of a file in nanoseconds,
+        this should be used when using sources initially.
+
+        Most sources will return the same as getDuration(), but can be overriden
+        for sources that have an infinite duration.
+        """
+        return self.duration
+
+    @property
+    def default_duration(self):
+        """Default duration of the source in nanoseconds"""
+        return self._getDefaultDuration()
+
     def _getDuration(self):
         return self.length
     duration = property(_getDuration)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]