From: Stuart Prescott <stuart@debian.org>
Date: Mon, 8 Dec 2025 17:25:21 +1100
Subject: Backport ujson test fixes

---
 srsly/tests/test_json_api.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/srsly/tests/test_json_api.py b/srsly/tests/test_json_api.py
index 89ce400..64b3654 100644
--- a/srsly/tests/test_json_api.py
+++ b/srsly/tests/test_json_api.py
@@ -55,8 +55,8 @@ def test_write_json_file():
     data = {"hello": "world", "test": 123}
     # Provide two expected options, depending on how keys are ordered
     expected = [
-        '{\n  "hello":"world",\n  "test":123\n}',
-        '{\n  "test":123,\n  "hello":"world"\n}',
+        '{\n  "hello": "world",\n  "test": 123\n}',
+        '{\n  "test": 123,\n  "hello": "world"\n}',
     ]
     with make_tempdir() as temp_dir:
         file_path = temp_dir / "tmp.json"
@@ -69,8 +69,8 @@ def test_write_json_file_gzip():
     data = {"hello": "world", "test": 123}
     # Provide two expected options, depending on how keys are ordered
     expected = [
-        '{\n  "hello":"world",\n  "test":123\n}',
-        '{\n  "test":123,\n  "hello":"world"\n}',
+        '{\n  "hello": "world",\n  "test": 123\n}',
+        '{\n  "test": 123,\n  "hello": "world"\n}',
     ]
     with make_tempdir() as temp_dir:
         file_path = force_string(temp_dir / "tmp.json")
@@ -83,8 +83,8 @@ def test_write_json_stdout(capsys):
     data = {"hello": "world", "test": 123}
     # Provide two expected options, depending on how keys are ordered
     expected = [
-        '{\n  "hello":"world",\n  "test":123\n}\n',
-        '{\n  "test":123,\n  "hello":"world"\n}\n',
+        '{\n  "hello": "world",\n  "test": 123\n}\n',
+        '{\n  "test": 123,\n  "hello": "world"\n}\n',
     ]
     write_json("-", data)
     captured = capsys.readouterr()
