summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2006-02-01 16:37:41 +0000
committerEdward Hervey <bilboed@bilboed.com>2006-02-01 16:37:41 +0000
commita21b83f5f5d65bd6a7ed4ee84f5002dae483bcf6 (patch)
treec668deeedbdbd8da1481aaf917c4ec4f4dc869f8 /testsuite
parent0ce8abe73dd9276fde5766c18118ef31bbf96b3d (diff)
testsuite/test_event.py: Properly use tempfile
Original commit message from CVS: * testsuite/test_event.py: Properly use tempfile
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/test_event.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/testsuite/test_event.py b/testsuite/test_event.py
index 07db04d..b962896 100644
--- a/testsuite/test_event.py
+++ b/testsuite/test_event.py
@@ -23,6 +23,7 @@
import os
import sys
import time
+import tempfile
from common import gst, unittest, testhelper, TestCase
@@ -71,13 +72,11 @@ class EventTest(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)