From 2d1e8553d76d25e63a927524a02004b4b303b231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Sch=C3=BCller?= Date: Fri, 25 Oct 2024 12:18:22 +0200 Subject: [PATCH] stages/test/test_tar: fix regex to be more robust For usecases where for example selinux is not supported, we should expect more errors from tar so we should also accept this when matching the string. Kudos go to Achilleas Koutsou for this hint --- stages/test/test_tar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stages/test/test_tar.py b/stages/test/test_tar.py index c8fa8cc7..064301a9 100644 --- a/stages/test/test_tar.py +++ b/stages/test/test_tar.py @@ -159,4 +159,4 @@ def test_tar_disk_full(stage_module, fake_inputs, tmp_path_disk_full, capfd): stage_module.main(fake_inputs, tmp_path_disk_full, options) assert ex.value.returncode == 2 - assert re.match(r".*Wrote only \d+ of \d+ bytes.*", str(capfd.readouterr().err)) + assert re.search(r"Wrote only \d+ of \d+ bytes", str(capfd.readouterr().err))