@joto commented on this pull request.
> @@ -541,6 +564,21 @@ def check_program_output(context, kind):
assert line in s,\
f"Output '{line}' not found in {kind} output:\n{s}\n"
+@then(r"the (?P<kind>\w+) output matches contents of (?P<result_file>.*)")
+def check_program_output_against_file(context, kind, result_file):
+ if kind == 'error':
+ s = context.osm2pgsql_outdata[1]
+ elif kind == 'standard':
+ s = context.osm2pgsql_outdata[0]
+ else:
+ assert not "Expect one of error, standard"
+
+ test_dir = (context.user_args.test_data_dir or Path('.')).resolve()
+ expected = open(test_dir / result_file, 'r').read()
fixed
--
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2453#discussion_r2775586151
You are receiving this because you are subscribed to this thread.
Message ID: <osm2pgsql-dev/osm2pgsql/pull/2453/review/[email protected]>_______________________________________________
Tile-serving mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/tile-serving