diff --git a/testsuite/yamatests/test_compact.py b/testsuite/yamatests/test_compact.py index 804c685..2703541 100644 --- a/testsuite/yamatests/test_compact.py +++ b/testsuite/yamatests/test_compact.py @@ -77,7 +77,7 @@ class TestYamaCompact(TestCase): seed = rng.randint(0, 9001) print(f"seed: {seed}") rng.seed(seed) - later_expected_descriptor, _ = generate_random_dir(rng, src_path, 32) + initial_descriptor, _ = generate_random_dir(rng, src_path, 32) subprocess.check_call(("datman", "backup-one", "srca", "main"), cwd=datman_path) orig_pointer_name = ( @@ -86,9 +86,8 @@ class TestYamaCompact(TestCase): .split("\n")[0] ) - randomly_mutate_directory_in_descriptor( - later_expected_descriptor, src_path, rng - ) + randomly_mutate_directory_in_descriptor(initial_descriptor, src_path, rng) + mutated_descriptor = scan_dir(src_path) subprocess.check_call(("datman", "backup-one", "srca", "main"), cwd=datman_path) @@ -171,8 +170,6 @@ class TestYamaCompact(TestCase): key, value = next(iter(value.contents.items())) self.assertEqual(key, "srca") - self.assertEqual( - value.ignore_metadata(), later_expected_descriptor.ignore_metadata() - ) + self.assertEqual(value.ignore_metadata(), mutated_descriptor.ignore_metadata()) td.cleanup()