]> git.openstreetmap.org Git - nominatim.git/blobdiff - tests/steps/terrain.py
Remove interpolation lines from placex and save them in an extra table.
[nominatim.git] / tests / steps / terrain.py
index 349deafed691d76e1c58a8a49f77c632a112a4bf..0569578aae9c3264231f346981b8ec32b1d472e8 100644 (file)
@@ -55,6 +55,7 @@ def run_nominatim_script(script, *args):
     proc = subprocess.Popen(cmd, cwd=world.config.source_dir,
                             stdout=subprocess.PIPE, stderr=subprocess.PIPE)
     (outp, outerr) = proc.communicate()
+    logger.debug("run_nominatim_script: %s\n%s\n%s" % (cmd, outp, outerr))
     assert (proc.returncode == 0), "Script '%s' failed:\n%s\n%s\n" % (script, outp, outerr)
 
 @world.absorb
@@ -122,16 +123,19 @@ def match_geometry(coord, matchstring):
     logger.debug("Distances expected: %f, got: %f" % (expdist, dist))
     assert dist <= expdist, "Geometry too far away, expected: %f, got: %f" % (expdist, dist)
 
+@world.absorb
+def print_statement(element):
+    print '\n\n\n'+str(element)+'\n\n\n'
 
 
 @world.absorb
 def db_dump_table(table):
     cur = world.conn.cursor()
     cur.execute('SELECT * FROM %s' % table)
-    print '<<<<<<< BEGIN OF TABLE DUMP %s' % table
+    print '\n\n\n<<<<<<< BEGIN OF TABLE DUMP %s' % table
     for res in cur:
             print res
-    print '<<<<<<< END OF TABLE DUMP %s' % table
+    print '<<<<<<< END OF TABLE DUMP %s\n\n\n' % table
 
 @world.absorb
 def db_drop_database(name):
@@ -181,6 +185,7 @@ def db_template_setup():
                             cwd=world.config.source_dir, stdin=subprocess.PIPE,
                             stdout=subprocess.PIPE, stderr=subprocess.PIPE)
     [outstr, errstr] = proc.communicate(input='<osm version="0.6"></osm>')
+    logger.debug("running osm2pgsql for template: %s\n%s\n%s" % (osm2pgsql, outstr, errstr))
     world.run_nominatim_script('setup', 'create-functions', 'create-tables', 'create-partition-tables', 'create-partition-functions', 'load-data', 'create-search-indices')