]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/python/utils/test_json_writer.py
enable flake for Python tests
[nominatim.git] / test / python / utils / test_json_writer.py
index 53e3f4d3073ca01bcc1ad0bdc89f90c4a8c92234..c0946f010c97f6507c429bca9d4a244efbdec0c6 100644 (file)
@@ -2,7 +2,7 @@
 #
 # This file is part of Nominatim. (https://nominatim.org)
 #
-# Copyright (C) 2024 by the Nominatim developer community.
+# Copyright (C) 2025 by the Nominatim developer community.
 # For a full list of authors see the git log.
 """
 Tests for the streaming JSON writer.
@@ -13,6 +13,7 @@ import pytest
 
 from nominatim_api.utils.json_writer import JsonWriter
 
+
 @pytest.mark.parametrize("inval,outstr", [(None, 'null'),
                                           (True, 'true'), (False, 'false'),
                                           (23, '23'), (0, '0'), (-1.3, '-1.3'),
@@ -71,6 +72,7 @@ def test_object_single_entry():
     assert writer() == '{"something":5}'
     json.loads(writer())
 
+
 def test_object_many_values():
     writer = JsonWriter()\
                 .start_object()\
@@ -82,6 +84,7 @@ def test_object_many_values():
     assert writer() == '{"foo":null,"bar":{},"baz":"b\\taz"}'
     json.loads(writer())
 
+
 def test_object_many_values_without_none():
     writer = JsonWriter()\
                 .start_object()\
@@ -89,7 +92,7 @@ def test_object_many_values_without_none():
                     .keyval_not_none('bar', None)\
                     .keyval_not_none('baz', '')\
                     .keyval_not_none('eve', False,
-                                     transform = lambda v: 'yes' if v else 'no')\
+                                     transform=lambda v: 'yes' if v else 'no')\
                 .end_object()
 
     assert writer() == '{"foo":0,"baz":"","eve":"no"}'