From f7d724ce33e0c215318454fbfa65f03e6f5e1105 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 26 Oct 2015 01:37:28 +0100 Subject: [PATCH] tests: only use mtime once in directory comparison tuples --- borg/testsuite/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/borg/testsuite/__init__.py b/borg/testsuite/__init__.py index cd790b571..2d2ee904f 100644 --- a/borg/testsuite/__init__.py +++ b/borg/testsuite/__init__.py @@ -85,8 +85,9 @@ class BaseTestCase(unittest.TestCase): if fuse and not have_fuse_mtime_ns: d1.append(round(st_mtime_ns(s1), -4)) d2.append(round(st_mtime_ns(s2), -4)) - d1.append(round(st_mtime_ns(s1), st_mtime_ns_round)) - d2.append(round(st_mtime_ns(s2), st_mtime_ns_round)) + else: + d1.append(round(st_mtime_ns(s1), st_mtime_ns_round)) + d2.append(round(st_mtime_ns(s2), st_mtime_ns_round)) d1.append(get_all(path1, follow_symlinks=False)) d2.append(get_all(path2, follow_symlinks=False)) self.assert_equal(d1, d2)