From 50ff9bb36a2799b4dd0206331d31122ce3e09d95 Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Sun, 20 Nov 2022 22:11:05 +0000 Subject: [PATCH] Fix including trailing empty line as pointer name --- testsuite/datmantests/test_backup_and_extract.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/testsuite/datmantests/test_backup_and_extract.py b/testsuite/datmantests/test_backup_and_extract.py index 8bb5d22..d54cbb7 100644 --- a/testsuite/datmantests/test_backup_and_extract.py +++ b/testsuite/datmantests/test_backup_and_extract.py @@ -331,11 +331,13 @@ kind = {{ stdout = "blahblah.txt" }} time.sleep(2) subprocess.check_call(("datman", "backup-one", "srca", "main"), cwd=datman_path) - pointer_names = ( - subprocess.check_output(("yama", "debug", "lsp"), cwd=yama_path) + pointer_names = [ + line + for line in subprocess.check_output(("yama", "debug", "lsp"), cwd=yama_path) .decode() .split("\n") - ) + if line + ] self.assertEqual(len(pointer_names), 3) self.assertLess(pointer_names[0], pointer_names[1]) self.assertLess(pointer_names[1], pointer_names[2])