예제 #1
0
파일: pawk_test.py 프로젝트: chirayuk/pawk
def test_action_match_negate():
    action = Action(r'(\w+) \w+', negate=True)
    groups = action._match('test case')
    assert groups is None
    groups = action._match('test')
    assert groups == ()
예제 #2
0
def test_action_match_negate():
    action = Action(r'(\w+) \w+', negate=True)
    groups = action._match('test case')
    assert groups is None
    groups = action._match('test')
    assert groups == ()
예제 #3
0
파일: pawk_test.py 프로젝트: chirayuk/pawk
def test_action_match():
    action = Action(r'(\w+) \w+')
    groups = action._match('test case')
    assert groups == ('test',)
예제 #4
0
def test_action_match():
    action = Action(r'(\w+) \w+')
    groups = action._match('test case')
    assert groups == ('test', )