summaryrefslogtreecommitdiffstats
path: root/qa/test_config.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_config.py
parentAdding upstream version 0.19.0~dev. (diff)
downloadgitlint-upstream.tar.xz
gitlint-upstream.zip
Adding upstream version 0.19.1.upstream/0.19.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'qa/test_config.py')
-rw-r--r--qa/test_config.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/qa/test_config.py b/qa/test_config.py
index 1225f6a..d051686 100644
--- a/qa/test_config.py
+++ b/qa/test_config.py
@@ -1,10 +1,8 @@
-# pylint: disable=too-many-function-args,unexpected-keyword-arg
-
+import os
import re
-from qa.shell import gitlint
from qa.base import BaseTestCase
-from qa.utils import DEFAULT_ENCODING
+from qa.shell import gitlint
class ConfigTests(BaseTestCase):
@@ -69,7 +67,7 @@ class ConfigTests(BaseTestCase):
"This line of the body is here because we need it"
)
filename = self.create_simple_commit(commit_msg, git_repo=target_repo)
- config_path = self.get_sample_path("config/gitlintconfig")
+ config_path = self.get_sample_path(os.path.join("config", "gitlintconfig"))
output = gitlint("--config", config_path, "--debug", _cwd=target_repo, _tty_in=True, _ok_code=[5])
expected_kwargs = self.get_debug_vars_last_commit(git_repo=target_repo)
@@ -128,7 +126,7 @@ class ConfigTests(BaseTestCase):
# Extract date from actual output to insert it into the expected output
# We have to do this since there's no way for us to deterministically know that date otherwise
p = re.compile("Date: (.*)\n", re.UNICODE | re.MULTILINE)
- result = p.search(output.stdout.decode(DEFAULT_ENCODING))
+ result = p.search(str(output))
date = result.group(1).strip()
expected_kwargs.update({"date": date})