Пример #1
0
 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"])
Пример #2
0
 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": {}}})
Пример #3
0
 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"])
Пример #4
0
 def test_empty_dir_trailing_slash(self):
     with unpacked_tar("empty.tar") as d:
         m = self.mdw.build(d + "/")
     self.assertEqual(m, {})