[SCM] morituri/master: * morituri/test/test_common_encode.py: Work around https://bugzilla.gnome.org/show_bug.cgi?id=688625
js at users.alioth.debian.org
js at users.alioth.debian.org
Sun Oct 19 20:09:44 UTC 2014
The following commit has been merged in the master branch:
commit d0435dc2abc3a52ffc57508b4f08fe115781f73d
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date: Mon Nov 19 20:44:53 2012 +0000
* morituri/test/test_common_encode.py:
Work around https://bugzilla.gnome.org/show_bug.cgi?id=688625
diff --git a/ChangeLog b/ChangeLog
index c9c0879..d1bba10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2012-11-19 Thomas Vander Stichele <thomas at apestaart dot org>
+ * morituri/test/test_common_encode.py:
+ Work around https://bugzilla.gnome.org/show_bug.cgi?id=688625
+
+2012-11-19 Thomas Vander Stichele <thomas at apestaart dot org>
+
* morituri/test/common.py:
Make tests log.
diff --git a/morituri/test/test_common_encode.py b/morituri/test/test_common_encode.py
index 5dcee01..4a74759 100644
--- a/morituri/test/test_common_encode.py
+++ b/morituri/test/test_common_encode.py
@@ -19,22 +19,31 @@ from morituri.test import common
class PathTestCase(common.TestCase):
def _testSuffix(self, suffix):
+ # because of https://bugzilla.gnome.org/show_bug.cgi?id=688625
+ # we first create the file with a 'normal' filename, then rename
self.runner = task.SyncRunner(verbose=False)
- fd, path = tempfile.mkstemp(suffix=suffix)
+ fd, path = tempfile.mkstemp()
+
cmd = "gst-launch " \
"audiotestsrc num-buffers=100 samplesperbuffer=1024 ! " \
"audioconvert ! audio/x-raw-int,width=16,depth=16,channels =2 ! " \
"wavenc ! " \
"filesink location=\"%s\" > /dev/null 2>&1" % (
gstreamer.quoteParse(path).encode('utf-8'), )
+ self.debug('Running cmd %r' % cmd)
os.system(cmd)
self.failUnless(os.path.exists(path))
- encodetask = encode.EncodeTask(path, path + '.out',
+ os.close(fd)
+
+ fd, newpath = tempfile.mkstemp(suffix=suffix)
+ os.rename(path, newpath)
+
+ encodetask = encode.EncodeTask(newpath, newpath + '.out',
encode.WavProfile())
self.runner.run(encodetask, verbose=False)
os.close(fd)
- os.unlink(path)
- os.unlink(path + '.out')
+ os.unlink(newpath)
+ os.unlink(newpath + '.out')
class UnicodePathTestCase(PathTestCase, common.UnicodeTestMixin):
--
morituri packaging
More information about the pkg-multimedia-commits
mailing list