Skip to content

Commit 7f854b5

Browse files
committed
Merge remote changes to resolve conflicts
Kept remote version of TestDecodeJSONIndentation with @pytest.mark.skip decorator as suggested by Copilot review. This is a better approach than removing the class entirely.
2 parents 16bfa8f + 25ca310 commit 7f854b5

2 files changed

Lines changed: 17 additions & 5 deletions

File tree

src/toon_format/decoder.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,11 @@ def decode(input_str: str, options: Optional[DecodeOptions] = None) -> Union[Jso
259259
>>> toon = "name: Alice\\nage: 30"
260260
>>> decode(toon)
261261
{'name': 'Alice', 'age': 30}
262-
>>> decode(toon, DecodeOptions(json_indent=2))
263-
'{\\n "name": "Alice",\\n "age": 30\\n}'
262+
>>> print(decode(toon, DecodeOptions(json_indent=2)))
263+
{
264+
"name": "Alice",
265+
"age": 30
266+
}
264267
"""
265268
if options is None:
266269
options = DecodeOptions()

tests/test_api.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,16 @@ def test_roundtrip_with_length_marker(self):
292292
assert decoded == original
293293

294294

295-
# Comprehensive tests for the json_indent feature are in TestDecodeJSONIndentationWithSpecFixtures,
296-
# which validates against official TOON specification fixtures from the TOON spec repository.
295+
# TODO: Add targeted unit tests for decode()'s json_indent feature here.
296+
# See Issue #10. For now, comprehensive tests are in TestDecodeJSONIndentationWithSpecFixtures.
297+
@pytest.mark.skip(reason="Placeholder for targeted decode() JSON indentation tests. See TODO above.")
298+
class TestDecodeJSONIndentation:
299+
"""Test decode() JSON indentation feature (Issue #10).
300+
301+
Comprehensive tests for the json_indent feature are in TestDecodeJSONIndentationWithSpecFixtures,
302+
which validates against official TOON specification fixtures.
303+
"""
304+
pass
297305

298306

299307
def _get_sample_decode_fixtures() -> List[tuple]:
@@ -374,7 +382,8 @@ def test_json_indent_with_different_indent_sizes(
374382

375383
# Different indent sizes should produce different strings (unless single line)
376384
if "\n" in result_2 and "\n" in result_4:
377-
# Multi-line results should differ in formatting and whitespace count
385+
# Multi-line results should differ in formatting
386+
# (indentation characters will be different)
378387
assert result_2 != result_4 and result_2.count(" ") != result_4.count(" ")
379388

380389
def test_json_indent_consistency_with_plain_decode(self):

0 commit comments

Comments
 (0)