'SeriesParser: test that eps are not picked as qualities'

def test_ep_as_quality(self, parse):

    from flexget.utils import qualities
    for quality1 in qualities.all_components():
        mock_ep1 = u''.join(list(filter(str.isdigit, quality1.name)))
        if (not mock_ep1):
            continue
        for quality2 in qualities.all_components():
            mock_ep2 = u''.join(list(filter(str.isdigit, quality2.name)))
            if (not mock_ep2):
                continue
            if ((int(mock_ep1) >= int(mock_ep2)) or (int(mock_ep2) > 999)):
                continue
            s = parse((u'FooBar    -    %s    %s-FlexGet' % (mock_ep1, quality2.name)), name=u'FooBar')
            assert (s.episode == int(mock_ep1)), (u'confused    episode    %s    with    quality    %s' % (mock_ep1, quality2.name))
            s = parse((u'[%s]    FooBar    -    %s    [FlexGet]' % (quality2.name, mock_ep1)), name=u'FooBar')
            assert (s.episode == int(mock_ep1)), (u'confused    episode    %s    with    quality    %s' % (mock_ep1, quality2.name))
