コード例 #1
0
ファイル: test_switch_lang.py プロジェクト: Bruce1986/thefuck
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)
コード例 #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)
コード例 #3
0
ファイル: test_switch_lang.py プロジェクト: tgunr/tryagain
def test_not_match(command):
    assert not switch_lang.match(command)
コード例 #4
0
ファイル: test_switch_lang.py プロジェクト: 7oi/thefuck
def test_not_match(command):
    assert not switch_lang.match(command, None)
コード例 #5
0
def test_match(command):
    assert switch_lang.match(command, None)
コード例 #6
0
def test_match(command):
    assert switch_lang.match(command)