aboutsummaryrefslogtreecommitdiffstats
path: root/packaging-tools/tests
diff options
context:
space:
mode:
authorPatrik Teivonen <patrik.teivonen@qt.io>2022-08-02 12:30:49 +0300
committerPatrik Teivonen <patrik.teivonen@qt.io>2022-10-18 11:36:19 +0000
commitbd38f3c2897c3f82f8c10464f70ed301c618dae7 (patch)
treef7c162973b153c92eace97e2b8fae00368afc85c /packaging-tools/tests
parenta99a1b1cc95f82841ad0d605d6db14522b3fa754 (diff)
Use logging functions from logging_util.py
-Remove inconsistent print function/logging module usage across scripts -Initialize logger from logging_util.py -Use CI friendly format in logging to stdout -Log file format with extra debug information (script, line, process) -Remove rainbow_logging_handler in favor of colorlog -Remove unnecessary print/log functions from unit tests -Remove unnecessary whitespace in logging messages Change-Id: Ib913cf2f6a2b02e06628f94dceeeaf845191b96b Reviewed-by: Antti Kokko <antti.kokko@qt.io>
Diffstat (limited to 'packaging-tools/tests')
-rw-r--r--packaging-tools/tests/test_build_wrapper.py1
-rwxr-xr-xpackaging-tools/tests/test_packaging.py4
-rwxr-xr-xpackaging-tools/tests/test_release_repo_updater.py1
3 files changed, 2 insertions, 4 deletions
diff --git a/packaging-tools/tests/test_build_wrapper.py b/packaging-tools/tests/test_build_wrapper.py
index 036bd1d0e..1834f9868 100644
--- a/packaging-tools/tests/test_build_wrapper.py
+++ b/packaging-tools/tests/test_build_wrapper.py
@@ -68,7 +68,6 @@ class TestBuildWrapper(unittest.TestCase):
remote_path_base = os.path.join(temp_dir, project_name, version_branch)
remote_path_snapshot_dir = os.path.join(remote_path_base, build_number)
remote_path_latest_link = os.path.join(remote_path_base, 'latest')
- print(remote_path_latest_link)
self.assertTrue(os.path.isdir(remote_path_base))
self.assertTrue(os.path.isdir(remote_path_snapshot_dir))
self.assertTrue(os.path.islink(remote_path_latest_link))
diff --git a/packaging-tools/tests/test_packaging.py b/packaging-tools/tests/test_packaging.py
index c31f33a59..b466d9f8e 100755
--- a/packaging-tools/tests/test_packaging.py
+++ b/packaging-tools/tests/test_packaging.py
@@ -141,8 +141,8 @@ class TestPackaging(unittest.TestCase):
idx = 0
for line in FileInput(temp_file, inplace=False):
- print(f"Received data: [{line.strip()}] expected data: [{expected_data[idx]}]")
- self.assertEqual(line.strip(), expected_data[idx], f"Received data: [{line}] differs from expected data: [{expected_data[idx]}]")
+ msg = f"Received data: [{line}] differs from expected data: [{expected_data[idx]}]"
+ self.assertEqual(line.strip(), expected_data[idx], msg)
idx += 1
finally:
rmtree(temp_dir)
diff --git a/packaging-tools/tests/test_release_repo_updater.py b/packaging-tools/tests/test_release_repo_updater.py
index bd2708dc5..9c5b2cbcf 100755
--- a/packaging-tools/tests/test_release_repo_updater.py
+++ b/packaging-tools/tests/test_release_repo_updater.py
@@ -272,7 +272,6 @@ class TestReleaseRepoUpdater(unittest.TestCase):
([""], [""])
)
async def test_format_task_filters(self, task_filters: List[str], exp_result: bool) -> None:
- print("test")
self.assertEqual(format_task_filters(task_filters), exp_result)
@asyncio_test_parallel_data( # type: ignore