summaryrefslogtreecommitdiffstats
path: root/qa/test_gitlint.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-03-11 08:03:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-03-11 08:03:03 +0000
commitde139943d8272773b5f19ed824d687b0232b9ba3 (patch)
tree47e73755bffd41bdde2d59d76cc595f5a1fa75d4 /qa/test_gitlint.py
parentAdding upstream version 0.19.0~dev. (diff)
downloadgitlint-upstream/0.19.1.tar.xz
gitlint-upstream/0.19.1.zip
Adding upstream version 0.19.1.upstream/0.19.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--qa/test_gitlint.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/qa/test_gitlint.py b/qa/test_gitlint.py
index 6c45196..7a04a39 100644
--- a/qa/test_gitlint.py
+++ b/qa/test_gitlint.py
@@ -1,8 +1,8 @@
-# pylint: disable=too-many-function-args,unexpected-keyword-arg
import os
-from qa.shell import echo, git, gitlint
+
from qa.base import BaseTestCase
-from qa.utils import DEFAULT_ENCODING
+from qa.shell import echo, git, gitlint
+from qa.utils import FILE_ENCODING
class IntegrationTests(BaseTestCase):
@@ -58,7 +58,7 @@ class IntegrationTests(BaseTestCase):
self.assertEqualStdout(output, expected)
# Make a small modification to the commit and commit it using fixup commit
- with open(os.path.join(self.tmp_git_repo, test_filename), "a", encoding=DEFAULT_ENCODING) as fh:
+ with open(os.path.join(self.tmp_git_repo, test_filename), "a", encoding=FILE_ENCODING) as fh:
fh.write("Appending söme stuff\n")
git("add", test_filename, _cwd=self.tmp_git_repo)
@@ -87,7 +87,7 @@ class IntegrationTests(BaseTestCase):
self.assertEqualStdout(output, expected)
# Make a small modification to the commit and commit it using fixup=amend commit
- with open(os.path.join(self.tmp_git_repo, test_filename), "a", encoding=DEFAULT_ENCODING) as fh:
+ with open(os.path.join(self.tmp_git_repo, test_filename), "a", encoding=FILE_ENCODING) as fh:
fh.write("Appending söme stuff\n")
git("add", test_filename, _cwd=self.tmp_git_repo)
@@ -133,7 +133,7 @@ class IntegrationTests(BaseTestCase):
self.assertEqualStdout(output, expected)
# Make a small modification to the commit and commit it using squash commit
- with open(os.path.join(self.tmp_git_repo, test_filename), "a", encoding=DEFAULT_ENCODING) as fh:
+ with open(os.path.join(self.tmp_git_repo, test_filename), "a", encoding=FILE_ENCODING) as fh:
# Wanted to write a unicode string, but that's obnoxious if you want to do it across Python 2 and 3.
# https://stackoverflow.com/questions/22392377/
# error-writing-a-file-with-file-write-in-python-unicodeencodeerror
@@ -252,7 +252,7 @@ class IntegrationTests(BaseTestCase):
binary_filename = self.create_simple_commit("Sïmple commit", file_contents=bytes([0x48, 0x00, 0x49, 0x00]))
output = gitlint(
"--debug",
- _ok_code=1,
+ _ok_code=[1],
_cwd=self.tmp_git_repo,
)