Esempio n. 1
0
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)
Esempio n. 2
0
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)
Esempio n. 3
0
def test_not_match(command):
    assert not switch_lang.match(command)
Esempio n. 4
0
def test_not_match(command):
    assert not switch_lang.match(command, None)
Esempio n. 5
0
def test_match(command):
    assert switch_lang.match(command, None)
Esempio n. 6
0
def test_match(command):
    assert switch_lang.match(command)