예제 #1
0
def test_guess(input, expected):
    guess = guessing.from_path(input)
    for k, v in expected.items():
        if isinstance(v, (str, bytes)):
            assert guess.get(k).lower() == v.lower()
        else:
            assert guess.get(k) == v
예제 #2
0
import logging
logging.basicConfig(level=logging.DEBUG)
logging.getLogger('dogpile').setLevel(logging.ERROR)
import submarin3guess as guess
import submarin3providers as providers

providers.register(cache_settings={'path': 'cache/cachefile.dbm'})
g = guess.from_path('Veep.S04E08.PROPER.720p.HDTV.x264-0SEC.mkv')
logging.info(g)