From 891800531d95c06fa2445ab4ab9d7e47713aa3f2 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 18 Dec 2024 11:10:02 +0100 Subject: [PATCH] fix long line in test_make_archive --- test/framework/filetools.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/framework/filetools.py b/test/framework/filetools.py index c3bfdd21bb..ed04896996 100644 --- a/test/framework/filetools.py +++ b/test/framework/filetools.py @@ -3178,6 +3178,7 @@ def test_make_archive(self): self.assertEqual(unreprod_tar, "custom_name.tar") self.assertExists(unreprod_tar) os.remove(unreprod_tar) + # custom .tar.gz self.mock_stdout(True) self.mock_stderr(True) @@ -3185,7 +3186,10 @@ def test_make_archive(self): stderr = self.get_stderr() self.mock_stdout(False) self.mock_stderr(False) - self.assertIn("WARNING: Can not create reproducible archive due to unsupported file compression (gz)", stderr) + + warning_msg = "WARNING: Can not create reproducible archive due to unsupported file compression (gz)" + self.assertIn(warning_msg, stderr) + custom_tgz_chksum = ft.compute_checksum(custom_tgz, checksum_type="sha256") self.assertEqual(custom_tgz, "custom_name.tar.gz") self.assertExists(custom_tgz) @@ -3196,7 +3200,9 @@ def test_make_archive(self): stderr = self.get_stderr() self.mock_stdout(False) self.mock_stderr(False) - self.assertNotIn("WARNING: Can not create reproducible archive due to unsupported file compression (gz)", stderr) + + self.assertNotIn(warning_msg, stderr) + custom_tgz_chksum = ft.compute_checksum(custom_tgz, checksum_type="sha256") self.assertEqual(custom_tgz, "custom_name.tar.gz") self.assertExists(custom_tgz)