Skip to content

Commit bf8e468

Browse files
committed
test(yaml): fix tests for new ruamel.yaml
Current tests expect incorrect YAML line wrapping. Line wrapping has been fixed in commx/ruamel-yaml@8c46a1a https://sourceforge.net/p/ruamel-yaml/code/ci/375c4db4c7c5fad61e149fc0690e50229df23ab3/
1 parent c3d1d31 commit bf8e468

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/long-line-default.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
balanceHeld:
2-
description: Balance of the account held for transferring to other users (in cents)
3-
and then a bunch more text after that
2+
description: Balance of the account held for transferring to other users (in
3+
cents) and then a bunch more text after that
44
type: integer

tests/test_remarshal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -693,13 +693,13 @@ def test_yaml_width_default(self, convert_and_read) -> None:
693693

694694
def test_yaml_width_5(self, convert_and_read) -> None:
695695
output = convert_and_read("long-line.json", "json", "yaml", width=5).decode()
696-
assert len([char for char in output if char == "\n"]) == 23
696+
assert len([char for char in output if char == "\n"]) == 24
697697

698698
def test_yaml_width_120(self, convert_and_read) -> None:
699699
output = convert_and_read("long-line.json", "json", "yaml", width=120).decode(
700700
"utf-8"
701701
)
702-
assert len([char for char in output if char == "\n"]) == 3
702+
assert len([char for char in output if char == "\n"]) == 4
703703

704704
def test_yaml_ident_5(self, convert_and_read) -> None:
705705
output = convert_and_read(

0 commit comments

Comments
 (0)