diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-01-25 13:26:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-01-25 13:26:35 +0000 |
commit | 4fee3e091a8d79a40f70ff9c1f87b29b9340049a (patch) | |
tree | 465ad9629a8ee56548bd6c51c3fc710907564911 /gitlint/tests/contrib/rules/test_conventional_commit.py | |
parent | Releasing debian version 0.14.0-1. (diff) | |
download | gitlint-4fee3e091a8d79a40f70ff9c1f87b29b9340049a.tar.xz gitlint-4fee3e091a8d79a40f70ff9c1f87b29b9340049a.zip |
Merging upstream version 0.15.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gitlint/tests/contrib/rules/test_conventional_commit.py')
-rw-r--r-- | gitlint/tests/contrib/rules/test_conventional_commit.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gitlint/tests/contrib/rules/test_conventional_commit.py b/gitlint/tests/contrib/rules/test_conventional_commit.py index 001af32..fb492df 100644 --- a/gitlint/tests/contrib/rules/test_conventional_commit.py +++ b/gitlint/tests/contrib/rules/test_conventional_commit.py @@ -20,28 +20,28 @@ class ContribConventionalCommitTests(BaseTestCase): # No violations when using a correct type and format for type in ["fix", "feat", "chore", "docs", "style", "refactor", "perf", "test", "revert", "ci", "build"]: - violations = rule.validate(type + u": föo", None) + violations = rule.validate(type + ": föo", None) self.assertListEqual([], violations) # assert violation on wrong type expected_violation = RuleViolation("CT1", "Title does not start with one of fix, feat, chore, docs," - " style, refactor, perf, test, revert, ci, build", u"bår: foo") - violations = rule.validate(u"bår: foo", None) + " style, refactor, perf, test, revert, ci, build", "bår: foo") + violations = rule.validate("bår: foo", None) self.assertListEqual([expected_violation], violations) # assert violation on wrong format expected_violation = RuleViolation("CT1", "Title does not follow ConventionalCommits.org format " - "'type(optional-scope): description'", u"fix föo") - violations = rule.validate(u"fix föo", None) + "'type(optional-scope): description'", "fix föo") + violations = rule.validate("fix föo", None) self.assertListEqual([expected_violation], violations) # assert no violation when adding new type - rule = ConventionalCommit({'types': [u"föo", u"bär"]}) - for typ in [u"föo", u"bär"]: - violations = rule.validate(typ + u": hür dur", None) + rule = ConventionalCommit({'types': ["föo", "bär"]}) + for typ in ["föo", "bär"]: + violations = rule.validate(typ + ": hür dur", None) self.assertListEqual([], violations) # assert violation when using incorrect type when types have been reconfigured - violations = rule.validate(u"fix: hür dur", None) - expected_violation = RuleViolation("CT1", u"Title does not start with one of föo, bär", u"fix: hür dur") + violations = rule.validate("fix: hür dur", None) + expected_violation = RuleViolation("CT1", "Title does not start with one of föo, bär", "fix: hür dur") self.assertListEqual([expected_violation], violations) |