def _do_test_parse_tree(self, parse_tree): dir = os.path.join(os.path.dirname(__file__), 'data', 'trees') o = Tree.from_file(hex_to_filename(dir, tree_sha)) o._parse_file() self.assertEquals([('a', 0100644, a_sha), ('b', 0100644, b_sha)], list(parse_tree(o.as_raw_string())))