Debian Codegraph @

testsuite/chroot-alt-dest-inner-module_test.py

raw symbols SCIP
1 #!/usr/bin/env python3
2 import shutil
3
4 from rsyncfns import run_checked, setup_chroot_inner
5 from rsyncfns import makepath, rsync_argv, test_fail
6
7 base, inner, outside, src, url = setup_chroot_inner('chroot-comparedest-inner')
8 makepath(inner / 'dest')
9 (src / 'f').write_text('same\n')
10 shutil.copy2(src / 'f', outside / 'f')
11 proc, out = run_checked(rsync_argv('-a', '--compare-dest=../linkparent', f'{src}/', f'{url}mod/dest/'))
12 if not (inner / 'dest' / 'f').exists():
13 test_fail(f"compare-dest used outside-inner-module metadata to suppress the transfer:\n{out}")
14 print("chroot-alt-dest-inner-module: outside compare-dest did not suppress destination creation")