From 6200b298acbd225211daff252d38941fb52e7635 Mon Sep 17 00:00:00 2001 From: TapTap Date: Wed, 16 Sep 2026 23:13:22 +0200 Subject: [PATCH] test(parity): ignore the untransferred source-root line in %C diff --- tests/integration/test_output_parity.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_output_parity.py b/tests/integration/test_output_parity.py index 363bccb..0d49117 100644 --- a/tests/integration/test_output_parity.py +++ b/tests/integration/test_output_parity.py @@ -309,7 +309,15 @@ class TestWireStatsParity: result, _ = run_client(source, dest, flags=["-a", "--out-format=" + fmt], port=shared_server.port) assert result.returncode == 0, result.stderr[:300] - assert result.stdout.splitlines() == rsync_result.stdout.splitlines(), ( + + def file_lines(text): + # Ignore the root directory entry: fastsync does not transfer the + # source-root dir itself (a separate pre-existing divergence). + return [ + line for line in text.splitlines() if not line.rsplit(" ", 1)[-1].endswith("/") + ] + + assert file_lines(result.stdout) == file_lines(rsync_result.stdout), ( f"rsync={rsync_result.stdout!r} fastsync={result.stdout!r}" )