diff options
Diffstat (limited to 'morphlib/fsutils_tests.py')
-rw-r--r-- | morphlib/fsutils_tests.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/morphlib/fsutils_tests.py b/morphlib/fsutils_tests.py index f49e6f89..7b159665 100644 --- a/morphlib/fsutils_tests.py +++ b/morphlib/fsutils_tests.py @@ -72,3 +72,28 @@ class InvertPathsTests(unittest.TestCase): found = frozenset(morphlib.fsutils.invert_paths(walker, ["./foo"])) unexpected = ("./foo", "./foo/bar", "./foo/baz") self.assertTrue(all(path not in found for path in unexpected)) + + def test_lower_mount_precludes(self): + walker = dummy_top_down_walker('.', { + "tmp": { + "morph": { + "staging": { + "build": None, + "inst": None, + }, + }, + "ccache": { + "0": None + }, + }, + "bin": { + }, + }) + found = frozenset(morphlib.fsutils.invert_paths( + walker, [ + "./tmp/morph/staging/build", + "./tmp/morph/staging/inst", + "./tmp", + ])) + expected = ("./bin",) + self.assertEqual(sorted(found), sorted(expected)) |