def test_file_and_subdir_trailing_slash(self): with unpacked_tar("file_and_subdir.tar") as d: m = ManifestDirWalker().build(d + "/") self.assertEqual(["/".join(path) for path, entries, attrs in m.walk()], ["", "file", "subdir", "subdir/foo"])
def test_file_and_subdir_trailing_slash(self): with unpacked_tar("file_and_subdir.tar") as d: m = self.mdw.build(d + "/") self.assertEqual(m, {"file": {}, "subdir": {"foo": {}}})
def test_file_and_subdir_trailing_slash(self): with unpacked_tar("file_and_subdir.tar") as d: m = ManifestDirWalker().build(d + "/") self.assertEqual(list(m.paths()), ["file", "subdir", "subdir/foo"])
def test_empty_dir_trailing_slash(self): with unpacked_tar("empty.tar") as d: m = self.mdw.build(d + "/") self.assertEqual(m, {})