2006-02-01 Edward Hervey <edward@fluendo.com>
+ * testsuite/test_event.py:
+ Properly use tempfile
+
+2006-02-01 Edward Hervey <edward@fluendo.com>
+
* gst/gst.defs:
When using gst.Element.send_event() and gst.Pad.send_event() we keep
a refcount on the sent event.
import os
import sys
import time
+import tempfile
from common import gst, unittest, testhelper, TestCase
class EventFileSrcTest(TestCase):
- # FIXME: properly create temp files
- filename = '/tmp/gst-python-test-file'
+
def setUp(self):
TestCase.setUp(self)
gst.info("start")
- if os.path.exists(self.filename):
- os.remove(self.filename)
+ self.filename = tempfile.mktemp()
open(self.filename, 'w').write(''.join(map(str, range(10))))
self.pipeline = gst.parse_launch('filesrc name=source location=%s blocksize=1 ! fakesink signal-handoffs=1 name=sink' % self.filename)