def _get_parsable(self, reverse=True): if reverse: fn = "The War At Home/Season 1/tpz-twat111.avi" fn = normpath(os.path.join(self.root, fn)) log.debug('rev parsable fn: "%s"', fn) log.debug("is valid path: %s", os.path.exists(fn)) return fn else: raise NotImplementedError
def _get_parsable(self, reverse=True): if reverse: fn = 'The War At Home/Season 1/tpz-twat111.avi' fn = normpath(os.path.join(self.root, fn)) log.debug('rev parsable fn: "%s"', fn) log.debug('is valid path: %s', os.path.exists(fn)) return fn else: raise NotImplementedError
from unittest import TestCase import unittest import os import logging from testprep import log from humblebee.importer import Importer from humblebee.util import normpath, syspath from humblebee.tvregexes import tv_regexes from humblebee.parser import base_parse_episode, reverse_parse_episode from humblebee.tvdbwrapper import lookup testfsdir = os.path.abspath(normpath(os.path.join(os.path.dirname(__file__), "testdata/testfs"))) # testfsdir = syspath( # normpath(os.path.join(os.path.dirname(__file__),'testdata/testfs')) # ) ### # all the importer,parser,lookup, dbguy tests class TestParseAndLookup(TestCase): def setUp(self): self.tvdir = testfsdir self.root = testfsdir def test_regexes(self): """ Test some of the filename regular expressions
import unittest import os import logging from testprep import log from humblebee.importer import Importer from humblebee.util import normpath, syspath from humblebee.tvregexes import tv_regexes from humblebee.parser import base_parse_episode, reverse_parse_episode from humblebee.tvdbwrapper import lookup testfsdir = os.path.abspath(normpath( os.path.join( os.path.dirname(__file__), 'testdata/testfs') )) #testfsdir = syspath( # normpath(os.path.join(os.path.dirname(__file__),'testdata/testfs')) # ) ### #all the importer,parser,lookup, dbguy tests class TestParseAndLookup(TestCase): def setUp(self): self.tvdir = testfsdir self.root = testfsdir def test_regexes(self):