[SCM] morituri/master: put space before colon

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Oct 19 20:10:08 UTC 2014


The following commit has been merged in the master branch:
commit 430ee02a71d42b52b60c380a91408a22c413a0a8
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Mon Jul 29 12:29:06 2013 +0200

    put space before colon

diff --git a/morituri/common/path.py b/morituri/common/path.py
index 8612e92..cb595ae 100644
--- a/morituri/common/path.py
+++ b/morituri/common/path.py
@@ -45,8 +45,9 @@ class PathFilter(object):
             path = re.sub(r'[/\\]', '-', path, re.UNICODE)
 
         def separators(path):
-            # replace separators with a hyphen
-            path = re.sub(r'[:\|]', '-', path, re.UNICODE)
+            # replace separators with a space-hyphen or hyphen
+            path = re.sub(r'[:]', ' -', path, re.UNICODE)
+            path = re.sub(r'[\|]', '-', path, re.UNICODE)
             return path
 
         # change all fancy single/double quotes to normal quotes
diff --git a/morituri/test/test_common_path.py b/morituri/test/test_common_path.py
index 7cec838..84a66d3 100644
--- a/morituri/test/test_common_path.py
+++ b/morituri/test/test_common_path.py
@@ -17,9 +17,14 @@ class FilterTestCase(common.TestCase):
 
     def testFat(self):
         part = u'A Word: F**k you?'
-        self.assertEquals(self._filter.filter(part), u'A Word- F__k you_')
+        self.assertEquals(self._filter.filter(part), u'A Word - F__k you_')
 
     def testSpecial(self):
         part = u'<<< $&*!\' "()`{}[]spaceship>>>'
         self.assertEquals(self._filter.filter(part),
                u'___ _____ ________spaceship___')
+
+    def testGreatest(self):
+        part = u'Greatest Ever! Soul: The Definitive Collection'
+        self.assertEquals(self._filter.filter(part),
+               u'Greatest Ever_ Soul - The Definitive Collection')

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list