+@pytest.mark.parametrize("threads", (1, 5))
+def test_load_data(dsn, place_row, placex_table, osmline_table,
+ word_table, temp_db_cursor, threads):
+ for func in ('precompute_words', 'getorcreate_housenumber_id', 'make_standard_name'):
+ temp_db_cursor.execute("""CREATE FUNCTION {} (src TEXT)
+ RETURNS TEXT AS $$ SELECT 'a'::TEXT $$ LANGUAGE SQL
+ """.format(func))
+ for oid in range(100, 130):
+ place_row(osm_id=oid)
+ place_row(osm_type='W', osm_id=342, cls='place', typ='houses',
+ geom='SRID=4326;LINESTRING(0 0, 10 10)')