Added further tests, PEP8 cleanup

This commit is contained in:
2010-01-30 10:21:25 +00:00
parent d6a3a2878e
commit 8d26a1a273
3 changed files with 22 additions and 15 deletions

View File

@@ -28,8 +28,15 @@ class testTvOrganise(unittest.TestCase):
"""
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):
self.tvo = tvorganise.TvOrganiser()
self.tvo._config = tvorganise.config.Config('tvorganise.cfg')
class testFindFiles(unittest.TestCase):

View File

@@ -13,11 +13,10 @@ import sys
import re
from optparse import OptionParser
import shutil
import ConfigParser
import logging
import config
def same_partition(path1, path2):
"""
Checks to see if two paths are on the same device, returns a

View File

@@ -1,6 +1,7 @@
import ConfigParser
import re
def defaults():
"""
Creates a ConfigParser instance and fills it with the default settings