summaryrefslogtreecommitdiffstats
path: root/gitlint/tests/contrib/rules/test_conventional_commit.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-01-25 13:26:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-01-25 13:26:08 +0000
commit3313b4f9c3c5d6a579588e77068ca3ae3edffe2b (patch)
tree81fccb2a4db79b0de9b0d64701581add3a9a1d21 /gitlint/tests/contrib/rules/test_conventional_commit.py
parentAdding upstream version 0.14.0. (diff)
downloadgitlint-3313b4f9c3c5d6a579588e77068ca3ae3edffe2b.tar.xz
gitlint-3313b4f9c3c5d6a579588e77068ca3ae3edffe2b.zip
Adding upstream version 0.15.0.upstream/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.py20
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)