From 3493d317e4a22dd41db4a512d35a310275d167e3 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 13 Jun 2022 11:49:38 +0200 Subject: [PATCH] bdd: clear lof buffer after a successful import run --- test/bdd/steps/steps_db_ops.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/bdd/steps/steps_db_ops.py b/test/bdd/steps/steps_db_ops.py index 63c5120e..98ed6e1c 100644 --- a/test/bdd/steps/steps_db_ops.py +++ b/test/bdd/steps/steps_db_ops.py @@ -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. -- 2.39.5