def test_match(): assert switch_lang.match(Mock(stderr='command not found: фзе-пуе', script=u'фзе-пуе'), None) assert not switch_lang.match(Mock(stderr='command not found: pat-get', script=u'pat-get'), None) assert not switch_lang.match(Mock(stderr='some info', script=u'фзе-пуе'), None)
def test_match(): assert switch_lang.match( Mock(stderr='command not found: фзе-пуе', script=u'фзе-пуе'), None) assert switch_lang.match( Mock(stderr='command not found: λσ', script=u'λσ'), None) assert not switch_lang.match( Mock(stderr='command not found: pat-get', script=u'pat-get'), None) assert not switch_lang.match( Mock(stderr='command not found: ls', script=u'ls'), None) assert not switch_lang.match(Mock(stderr='some info', script=u'фзе-пуе'), None)
def test_not_match(command): assert not switch_lang.match(command)
def test_not_match(command): assert not switch_lang.match(command, None)
def test_match(command): assert switch_lang.match(command, None)
def test_match(command): assert switch_lang.match(command)