]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/bdd/steps/steps_db_ops.py
bdd: clear lof buffer after a successful import run
[nominatim.git] / test / bdd / steps / steps_db_ops.py
index 63c5120e88a894c99970a218a7b864fe48f1055d..98ed6e1c3f247c3432a68d3502305c32be96f923 100644 (file)
@@ -99,6 +99,11 @@ def import_and_index_data_from_place_table(context):
 
     check_database_integrity(context)
 
+    # Remove the output of the input, when all was right. Otherwise it will be
+    # output when there are errors that had nothing to do with the import
+    # itself.
+    context.log_capture.buffer.clear()
+
 @when("updating places")
 def update_place_table(context):
     """ Update the place table with the given data. Also runs all triggers
@@ -112,6 +117,12 @@ def update_place_table(context):
     context.nominatim.reindex_placex(context.db)
     check_database_integrity(context)
 
+    # Remove the output of the input, when all was right. Otherwise it will be
+    # output when there are errors that had nothing to do with the import
+    # itself.
+    context.log_capture.buffer.clear()
+
+
 @when("updating postcodes")
 def update_postcodes(context):
     """ Rerun the calculation of postcodes.