Fix filefilter (#1186) tests for consistent colons

I added this to the pretend output a few commits ago.
This commit is contained in:
Adrian Sampson 2015-01-20 14:34:42 -08:00
parent 0a8dcadb75
commit 8e94419c2a
2 changed files with 17 additions and 16 deletions

View file

@ -12,7 +12,8 @@
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
"""Filters the imported files using a regular expression"""
"""Filter imported files using a regular expression.
"""
import re
from beets import config
@ -55,8 +56,8 @@ class FileFilterPlugin(BeetsPlugin):
task.choice_flag = action.SKIP
def file_filter(self, full_path):
"""Checks if the configured regular expressions allow the import of the
file given in full_path.
"""Checks if the configured regular expressions allow the import
of the file given in full_path.
"""
import_config = dict(config['import'])
if 'singletons' not in import_config or not import_config[

View file

@ -64,7 +64,7 @@ class FileFilterPluginTest(unittest.TestCase, ImportHelper):
'albumartist': None,
'mb_trackid': None,
'mb_albumid': None,
'comp': None
'comp': None,
}
self.album_paths = []
for i in range(count):
@ -118,13 +118,13 @@ class FileFilterPluginTest(unittest.TestCase, ImportHelper):
"""
self.__reset_config()
self.__run([
'Album %s' % displayable_path(self.artist_path),
'Album: %s' % displayable_path(self.artist_path),
' %s' % displayable_path(self.artist_paths[0]),
' %s' % displayable_path(self.artist_paths[1]),
'Album %s' % displayable_path(self.album_path),
'Album: %s' % displayable_path(self.album_path),
' %s' % displayable_path(self.album_paths[0]),
' %s' % displayable_path(self.album_paths[1]),
'Album %s' % displayable_path(self.misc_path),
'Album: %s' % displayable_path(self.misc_path),
' %s' % displayable_path(self.misc_paths[0]),
' %s' % displayable_path(self.misc_paths[1])
])
@ -139,9 +139,9 @@ class FileFilterPluginTest(unittest.TestCase, ImportHelper):
self.__reset_config()
config['filefilter']['path'] = '.*track_1.*\.mp3'
self.__run([
'Album %s' % displayable_path(self.artist_path),
'Album: %s' % displayable_path(self.artist_path),
' %s' % displayable_path(self.artist_paths[0]),
'Album %s' % displayable_path(self.misc_path),
'Album: %s' % displayable_path(self.misc_path),
' %s' % displayable_path(self.misc_paths[0]),
])
self.__run([
@ -154,9 +154,9 @@ class FileFilterPluginTest(unittest.TestCase, ImportHelper):
self.__reset_config()
config['filefilter']['album_path'] = '.*track_1.*\.mp3'
self.__run([
'Album %s' % displayable_path(self.artist_path),
'Album: %s' % displayable_path(self.artist_path),
' %s' % displayable_path(self.artist_paths[0]),
'Album %s' % displayable_path(self.misc_path),
'Album: %s' % displayable_path(self.misc_path),
' %s' % displayable_path(self.misc_paths[0]),
])
self.__run([
@ -177,13 +177,13 @@ class FileFilterPluginTest(unittest.TestCase, ImportHelper):
'Singleton: %s' % displayable_path(self.misc_paths[0])
], singletons=True)
self.__run([
'Album %s' % displayable_path(self.artist_path),
'Album: %s' % displayable_path(self.artist_path),
' %s' % displayable_path(self.artist_paths[0]),
' %s' % displayable_path(self.artist_paths[1]),
'Album %s' % displayable_path(self.album_path),
'Album: %s' % displayable_path(self.album_path),
' %s' % displayable_path(self.album_paths[0]),
' %s' % displayable_path(self.album_paths[1]),
'Album %s' % displayable_path(self.misc_path),
'Album: %s' % displayable_path(self.misc_path),
' %s' % displayable_path(self.misc_paths[0]),
' %s' % displayable_path(self.misc_paths[1])
])
@ -194,9 +194,9 @@ class FileFilterPluginTest(unittest.TestCase, ImportHelper):
config['filefilter']['album_path'] = '.*track_1.*\.mp3'
config['filefilter']['singleton_path'] = '.*track_2.*\.mp3'
self.__run([
'Album %s' % displayable_path(self.artist_path),
'Album: %s' % displayable_path(self.artist_path),
' %s' % displayable_path(self.artist_paths[0]),
'Album %s' % displayable_path(self.misc_path),
'Album: %s' % displayable_path(self.misc_path),
' %s' % displayable_path(self.misc_paths[0]),
])
self.__run([