mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
testsuite/test_event.py: Properly use tempfile
Original commit message from CVS: * testsuite/test_event.py: Properly use tempfile
This commit is contained in:
parent
0ce8abe73d
commit
a21b83f5f5
2 changed files with 8 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2006-02-01 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
|
* testsuite/test_event.py:
|
||||||
|
Properly use tempfile
|
||||||
|
|
||||||
2006-02-01 Edward Hervey <edward@fluendo.com>
|
2006-02-01 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
* gst/gst.defs:
|
* gst/gst.defs:
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
import tempfile
|
||||||
|
|
||||||
from common import gst, unittest, testhelper, TestCase
|
from common import gst, unittest, testhelper, TestCase
|
||||||
|
|
||||||
|
@ -71,13 +72,11 @@ class EventTest(TestCase):
|
||||||
|
|
||||||
|
|
||||||
class EventFileSrcTest(TestCase):
|
class EventFileSrcTest(TestCase):
|
||||||
# FIXME: properly create temp files
|
|
||||||
filename = '/tmp/gst-python-test-file'
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
TestCase.setUp(self)
|
TestCase.setUp(self)
|
||||||
gst.info("start")
|
gst.info("start")
|
||||||
if os.path.exists(self.filename):
|
self.filename = tempfile.mktemp()
|
||||||
os.remove(self.filename)
|
|
||||||
open(self.filename, 'w').write(''.join(map(str, range(10))))
|
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)
|
self.pipeline = gst.parse_launch('filesrc name=source location=%s blocksize=1 ! fakesink signal-handoffs=1 name=sink' % self.filename)
|
||||||
|
|
Loading…
Reference in a new issue