73
75
self.addCleanup(sub_tree.unlock)
74
76
self.assertEqual('file1-id', sub_tree.path2id('file1'))
76
78
self.assertEqual('subtree-root-id', sub_tree.path2id(''))
77
79
self.assertEqual('', sub_tree.id2path('subtree-root-id'))
78
80
self.assertIs(None, base_tree.path2id('subtree/file1'))
80
82
self.addCleanup(base_tree.unlock)
82
84
self.assertEqual('subtree-root-id', base_tree.path2id('subtree'))
83
85
self.assertEqual('subtree', base_tree.id2path('subtree-root-id'))