예제 #1
0
def test_parser_return_minor_bump_level():
    assert tag_parser(":sparkles: Add emoji parser")[0] == 2
예제 #2
0
def test_parser_return_patch_bump_level():
    assert tag_parser(":nut_and_bolt: Fix regex in angular parser")[0] == 1
예제 #3
0
def test_parser_return_type_feature_from_commit_message():
    assert tag_parser(':sparkles: ...')[1] == 'feature'
예제 #4
0
def test_parser_return_major_bump_level():
    commit = ":sparkles: Add new parser pattern\n\nBREAKING CHANGE:"
    assert tag_parser(commit)[0] == 3
예제 #5
0
def test_parser_return_text_from_commit_message():
    commit = ":nut_and_bolt: Fix regex in an parser\n\n{}".format(text)
    assert tag_parser(commit)[3][1] == text
예제 #6
0
def test_parser_return_type_from_commit_message():
    assert tag_parser(':guardsman: ...')[1] == 'breaking'
    assert tag_parser(':sparkles: ...')[1] == 'feature'
    assert tag_parser(':nut_and_bolt: ...')[1] == 'fix'
def test_parser_return_type_fix_from_commit_message():
    assert tag_parser(':nut_and_bolt: ...')[1] == 'fix'
예제 #8
0
def test_parser_return_type_fix_from_commit_message():
    assert tag_parser(":nut_and_bolt: ...")[1] == "fix"
def test_parser_return_type_breaking_from_commit_message():
    commit = ':sparkles: Add new parser pattern\n\nBREAKING CHANGE:'
    assert tag_parser(commit)[1] == 'breaking'
def test_parser_return_type_feature_from_commit_message():
    assert tag_parser(':sparkles: ...')[1] == 'feature'
def test_parser_return_patch_bump_level():
    assert tag_parser(':nut_and_bolt: Fix regex in angular parser')[0] == 1
def test_parser_return_minor_bump_level():
    assert tag_parser(':sparkles: Add emoji parser')[0] == 2
def test_parser_return_major_bump_level():
    commit = ':sparkles: Add new parser pattern\n\nBREAKING CHANGE:'
    assert tag_parser(commit)[0] == 3
예제 #14
0
def test_parser_return_type_breaking_from_commit_message():
    commit = ":sparkles: Add new parser pattern\n\nBREAKING CHANGE:"
    assert tag_parser(commit)[1] == "breaking"
def test_parser_return_subject_from_commit_message():
    assert tag_parser(':sparkles: Add emoji parser')[3][0] == 'Add emoji parser'
예제 #16
0
def test_parser_return_type_feature_from_commit_message():
    assert tag_parser(":sparkles: ...")[1] == "feature"
def test_parser_return_text_from_commit_message():
    commit = ':nut_and_bolt: Fix regex in an parser\n\n{}'.format(text)
    assert tag_parser(commit)[3][1] == text
예제 #18
0
def test_parser_return_subject_from_commit_message():
    assert tag_parser(
        ":sparkles: Add emoji parser")[3][0] == "Add emoji parser"
def test_parser_return_footer_from_commit_message():
    commit = ':nut_and_bolt: Fix env \n\n{t[text]}\n\n{t[footer]}'.format(t=globals())
    assert tag_parser(commit)[3][2] == footer
예제 #20
0
def test_parser_return_footer_from_commit_message():
    commit = ":nut_and_bolt: Fix env \n\n{t[text]}\n\n{t[footer]}".format(
        t=globals())
    assert tag_parser(commit)[3][2] == footer
예제 #21
0
def test_parser_return_correct_bump_level():
    assert tag_parser(':guardsman: Remove emoji parser')[0] == 3
    assert tag_parser(':feature: Add emoji parser')[0] == 3
    assert tag_parser(':nut_and_bolt: Fix regex in angular parser')[0] == 1
    assert tag_parser('Add a test for angular parser')[0] == 0