* morituri/common/common.py:
Add shrinkPath to write shorter path names. * morituri/test/test_common_common.py (added): Add test. * morituri/program/cdparanoia.py: Catch ENAMETOOLONG and shrink path. * morituri/common/program.py: Update track result's filename if it was shrunk. * morituri/rip/cd.py: set the possibly shrunk path on the result.
This commit is contained in:
17
morituri/test/test_common_common.py
Normal file
17
morituri/test/test_common_common.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# -*- Mode: Python; test-case-name: morituri.test.test_common_common -*-
|
||||
# vi:si:et:sw=4:sts=4:ts=4
|
||||
|
||||
import os
|
||||
|
||||
from morituri.common import common
|
||||
|
||||
from morituri.test import common as tcommon
|
||||
|
||||
class ShrinkTestCase(tcommon.TestCase):
|
||||
def testSufjan(self):
|
||||
path = u'morituri/Sufjan Stevens - Illinois/02. Sufjan Stevens - The Black Hawk War, or, How to Demolish an Entire Civilization and Still Feel Good About Yourself in the Morning, or, We Apologize for the Inconvenience but You\'re Going to Have to Leave Now, or, "I Have Fought the Big Knives and Will Continue to Fight Them Until They Are Off Our Lands!".flac'
|
||||
|
||||
shorter = common.shrinkPath(path)
|
||||
self.failUnless(os.path.splitext(path)[0].startswith(
|
||||
os.path.splitext(shorter)[0]))
|
||||
self.failIfEquals(path, shorter)
|
||||
Reference in New Issue
Block a user