Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)

src/l/i/linz2osm-HEAD/linz2osm/convert/tests/osm.py   linz2osm(Download)
        # print w.xml()
 
        n = w.tree.find('./create/node')
        self.assert_(n is not None, "Couldn't find <node>")
        self.assertEqual(n.get('id'), id[0])
        # print w.xml()
 
        n = w.tree.find('./create/way')
        self.assert_(n is not None, "Couldn't find <way>")
 
        # print w.xml()
 
        wn = w.tree.find('./create/way')
        nodes = w.tree.findall('./create/node')
        self.assertEqual(len(nodes), 3) # not 4!
        node_map = dict([(nn.get('id'), nn) for nn in nodes])
 
        rel = w.tree.find('./create/relation')
        rel_members = rel.findall('member')
        self.assertEqual(len(rel_members), 2)
        # print w.xml()
 
        wn = w.tree.find('./create/way')
        nodes = w.tree.findall('./create/node')
        self.assertEqual(len(nodes), 4) # not 4!