]> git.openstreetmap.org Git - nominatim.git/blobdiff - tests/steps/osm2pgsql_setup.py
utils/update.php: use fail() whenever possible for errors
[nominatim.git] / tests / steps / osm2pgsql_setup.py
index e5198d9df97736d3a3685a2fd365cd7f3e2d8516..eaa14573b58675b9ce2ac403f51ba3a14e3c2223 100644 (file)
@@ -140,7 +140,7 @@ def osm2pgsql_load_place(step):
     world.osm2pgsql.sort(cmp=_sort_xml_entries)
 
     # create a OSM file in /tmp
-    with tempfile.NamedTemporaryFile(dir='/tmp', delete=False) as fd:
+    with tempfile.NamedTemporaryFile(dir='/tmp', suffix='.osm', delete=False) as fd:
         fname = fd.name
         fd.write("<?xml version='1.0' encoding='UTF-8'?>\n")
         fd.write('<osm version="0.6" generator="test-nominatim" timestamp="2014-08-26T20:22:02Z">\n')
@@ -188,7 +188,7 @@ def osm2pgsql_update_place(step):
     world.run_nominatim_script('setup', 'index', 'index-noanalyse')
     world.run_nominatim_script('setup', 'create-functions', 'create-partition-functions', 'enable-diff-updates')
 
-    with tempfile.NamedTemporaryFile(dir='/tmp', delete=False) as fd:
+    with tempfile.NamedTemporaryFile(dir='/tmp', suffix='.osc', delete=False) as fd:
         fname = fd.name
         fd.write("<?xml version='1.0' encoding='UTF-8'?>\n")
         fd.write('<osmChange version="0.6" generator="Osmosis 0.43.1">\n')