1
0
Fork 0

Merging upstream version 0.19.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 06:07:32 +01:00
parent 61e6dccee9
commit 2efee3d3ab
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
111 changed files with 2058 additions and 1676 deletions

View file

@ -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,
)