mirror of
https://github.com/nikdoof/tvorganise.git
synced 2025-12-18 20:39:27 +00:00
Added further tests, PEP8 cleanup
This commit is contained in:
@@ -28,8 +28,15 @@ class testTvOrganise(unittest.TestCase):
|
|||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def testParseFilenames(self):
|
||||||
|
files = ['/media/out/Heroes - [01x05] - Llamaggeddon.avi']
|
||||||
|
|
||||||
|
res = self.tvo.parse_filenames(files)
|
||||||
|
self.assertEqual(res[0]['showname'], 'Heroes')
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.tvo = tvorganise.TvOrganiser()
|
self.tvo = tvorganise.TvOrganiser()
|
||||||
|
self.tvo._config = tvorganise.config.Config('tvorganise.cfg')
|
||||||
|
|
||||||
|
|
||||||
class testFindFiles(unittest.TestCase):
|
class testFindFiles(unittest.TestCase):
|
||||||
|
|||||||
@@ -13,11 +13,10 @@ import sys
|
|||||||
import re
|
import re
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
import shutil
|
import shutil
|
||||||
import ConfigParser
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import config
|
import config
|
||||||
|
|
||||||
|
|
||||||
def same_partition(path1, path2):
|
def same_partition(path1, path2):
|
||||||
"""
|
"""
|
||||||
Checks to see if two paths are on the same device, returns a
|
Checks to see if two paths are on the same device, returns a
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import ConfigParser
|
import ConfigParser
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
def defaults():
|
def defaults():
|
||||||
"""
|
"""
|
||||||
Creates a ConfigParser instance and fills it with the default settings
|
Creates a ConfigParser instance and fills it with the default settings
|
||||||
|
|||||||
Reference in New Issue
Block a user