Ejemplo n.º 1
0
    def test_exact_name(self):
        """SeriesParser: test exact/strict name parsing"""

        s = SeriesParser()
        s.name = 'test'
        s.data = 'Test.Foobar.S01E02.720p-FlexGet'
        s.parse()
        assert s.valid, 'normal failed'

        s = SeriesParser()
        s.strict_name = True
        s.name = 'test'
        s.data = 'Test.A.S01E02.720p-FlexGet'
        s.parse()
        assert not s.valid, 'strict A failed'

        s = SeriesParser()
        s.strict_name = True
        s.name = 'Test AB'
        s.data = 'Test.AB.S01E02.720p-FlexGet'
        s.parse()
        assert s.valid, 'strict AB failed'

        s = SeriesParser()
        s.strict_name = True
        s.name = 'Red Tomato'
        s.data = 'Red Tomato (US) S01E02 720p-FlexGet'
        s.parse()
        assert not s.valid, 'Red Tomato (US) should not match Red Tomato in exact mode'
Ejemplo n.º 2
0
    def test_exact_name(self):
        """SeriesParser: test exact/strict name parsing"""

        s = SeriesParser()
        s.name = 'test'
        s.data = 'Test.Foobar.S01E02.720p-FlexGet'
        s.parse()
        assert s.valid, 'normal failed'

        s = SeriesParser()
        s.strict_name = True
        s.name = 'test'
        s.data = 'Test.A.S01E02.720p-FlexGet'
        s.parse()
        assert not s.valid, 'strict A failed'

        s = SeriesParser()
        s.strict_name = True
        s.name = 'Test AB'
        s.data = 'Test.AB.S01E02.720p-FlexGet'
        s.parse()
        assert s.valid, 'strict AB failed'

        s = SeriesParser()
        s.strict_name = True
        s.name = 'Red Tomato'
        s.data = 'Red Tomato (US) S01E02 720p-FlexGet'
        s.parse()
        assert not s.valid, 'Red Tomato (US) should not match Red Tomato in exact mode'
Ejemplo n.º 3
0
    def test_exact_name(self):
        """SeriesParser: test exact/strict name parsing"""

        s = SeriesParser()
        s.name = "test"
        s.data = "Test.Foobar.S01E02.720p-FlexGet"
        s.parse()
        assert s.valid, "normal failed"

        s = SeriesParser()
        s.strict_name = True
        s.name = "test"
        s.data = "Test.A.S01E02.720p-FlexGet"
        s.parse()
        assert not s.valid, "strict A failed"

        s = SeriesParser()
        s.strict_name = True
        s.name = "Test AB"
        s.data = "Test.AB.S01E02.720p-FlexGet"
        s.parse()
        assert s.valid, "strict AB failed"

        s = SeriesParser()
        s.strict_name = True
        s.name = "Red Tomato"
        s.data = "Red Tomato (US) S01E02 720p-FlexGet"
        s.parse()
        assert not s.valid, "Red Tomato (US) should not match Red Tomato in exact mode"