Skip to content

Commit

Permalink
fix long line in test_make_archive
Browse files Browse the repository at this point in the history
  • Loading branch information
boegel committed Dec 18, 2024
1 parent 848de66 commit 8918005
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/framework/filetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -3178,14 +3178,18 @@ 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)
custom_tgz = ft.make_archive(tardir, archive_file="custom_name.tar.gz", reproducible=True)
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)
Expand All @@ -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)
Expand Down

0 comments on commit 8918005

Please sign in to comment.