diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2021-11-21 15:43:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-21 15:43:04 +0100 |
commit | 0f6a55c7f6f481acdcf57fbe68d3da80d77b9d89 (patch) | |
tree | 2efc3ba8e7f34d8e355a7eb679875db1ab47aa69 | |
parent | 825dce1be9521a6a2f8b0e1e501d0d258ebb66bb (diff) | |
download | pylint-git-0f6a55c7f6f481acdcf57fbe68d3da80d77b9d89.tar.gz |
Revert "Update functional test updater to print actual string (#5351)" (#5352)
This reverts commit 825dce1be9521a6a2f8b0e1e501d0d258ebb66bb.
-rw-r--r-- | pylint/testutils/output_line.py | 9 | ||||
-rw-r--r-- | tests/test_functional.py | 3 |
2 files changed, 3 insertions, 9 deletions
diff --git a/pylint/testutils/output_line.py b/pylint/testutils/output_line.py index 4e08f1a7d..9e5a071d2 100644 --- a/pylint/testutils/output_line.py +++ b/pylint/testutils/output_line.py @@ -114,11 +114,4 @@ class OutputLine(NamedTuple): raise MalformedOutputLineException(row, e) from e def to_csv(self) -> Tuple[str, str, str, str, str, str]: - return ( - str(self.symbol), - str(self.lineno), - str(self.column), - str(self.object), - str(self.msg), - str(self.confidence), - ) + return tuple(str(i) for i in self) # type: ignore[return-value] # pylint: disable=not-an-iterable diff --git a/tests/test_functional.py b/tests/test_functional.py index 3512981d2..513823a05 100644 --- a/tests/test_functional.py +++ b/tests/test_functional.py @@ -65,8 +65,9 @@ class LintModuleOutputUpdate(testutils.LintModuleTest): os.remove(self._test_file.expected_output) return with open(self._test_file.expected_output, "w", encoding="utf-8") as f: + writer = csv.writer(f, dialect="test") for line in actual_output: - print(":".join(line.to_csv()), file=f) + writer.writerow(line.to_csv()) def get_tests(): |