コード例 #1
0
ファイル: test.py プロジェクト: befozg/Regular_expression
def test_for_yes_2():
    assert (does_the_prefix_exist("a1.b+c+a.bc++*", "b", 2) == "YES")
コード例 #2
0
ファイル: test.py プロジェクト: befozg/Regular_expression
def test_for_no_2():
    assert (does_the_prefix_exist("acb..ab+.*ab+.ac.a*.", "c", 3) == "NO")
コード例 #3
0
ファイル: test.py プロジェクト: befozg/Regular_expression
def test_for_no_3():
    assert (does_the_prefix_exist("ab.c.a.a.a.a.*", "a", 4) == "NO")
コード例 #4
0
ファイル: test.py プロジェクト: befozg/Regular_expression
def test_try_except_stack_error():
    try:
        does_the_prefix_exist("ab+c+ccc...*.", "a", 2)
    except Exception:
        return ("ERROR")
コード例 #5
0
ファイル: test.py プロジェクト: befozg/Regular_expression
def test_for_no_1():
    assert (does_the_prefix_exist("1*a.c*.", "c", 3) == "NO")
コード例 #6
0
ファイル: test.py プロジェクト: befozg/Regular_expression
def test_for_yes_1():
    assert (does_the_prefix_exist("a**aa..", "a", 8) == "YES")
コード例 #7
0
ファイル: test.py プロジェクト: befozg/Regular_expression
def test_try_except_x_error():
    try:
        does_the_prefix_exist("ab+c+ccc..1..a*", "z", 2)
    except Exception:
        return ("ERROR")
コード例 #8
0
ファイル: test.py プロジェクト: befozg/Regular_expression
def test_try_except_k_error():
    try:
        does_the_prefix_exist("ab+c+ccc...a*", "a", -1)
    except Exception:
        return ("ERROR")
コード例 #9
0
ファイル: test.py プロジェクト: befozg/Regular_expression
def test_try_except_letter_error():
    try:
        does_the_prefix_exist("ab+c+ccc...d2.*", "a", 5)
    except Exception:
        return ("ERROR")
コード例 #10
0
ファイル: test.py プロジェクト: befozg/Regular_expression
def test_for_yes_3():
    assert (does_the_prefix_exist("ab+c+a.bc++*", "c", 6) == "YES")