From 2035df9b6bad93a88fba7cd572d9939d1d6fa18d Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 11 Dec 2020 19:22:44 +0200 Subject: fix: how manifests are created and compared --- subplot/data.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/subplot/data.py b/subplot/data.py index c4cb0a7..9eadd3f 100644 --- a/subplot/data.py +++ b/subplot/data.py @@ -28,7 +28,8 @@ def _create_manifest_of_directory(ctx, dirname=None, manifest=None): runcmd_get_exit_code = globals()["runcmd_get_exit_code"] runcmd_get_stdout = globals()["runcmd_get_stdout"] - runcmd_run(ctx, ["summain", dirname]) + logging.info(f"creating manifest for {dirname} in {manifest}") + runcmd_run(ctx, ["find", "-exec", "summain", "{}", "+"], cwd=dirname) assert runcmd_get_exit_code(ctx) == 0 stdout = runcmd_get_stdout(ctx) open(manifest, "w").write(stdout) @@ -38,7 +39,7 @@ def files_match(ctx, first=None, second=None): assert_eq = globals()["assert_eq"] f = open(first).read() - s = open(first).read() - logging.debug(f"files_match: f={f!r}") - logging.debug(f"files_match: s={s!r}") + s = open(second).read() + logging.debug(f"files_match: f:\n{f}") + logging.debug(f"files_match: s:\n{s}") assert_eq(f, s) -- cgit v1.2.1