summaryrefslogtreecommitdiff
path: root/bs4/tests/test_formatter.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2023-03-24 14:52:35 -0400
committerLeonard Richardson <leonardr@segfault.org>2023-03-24 14:52:35 -0400
commit8944fe70574914cabfc9e6fb6eb048d71be39fb1 (patch)
treee3f7cda44701144f59fbcbc702d27085363350bd /bs4/tests/test_formatter.py
parent347cefbe76cc70bd99dc6b5f0274189cdb94bbb9 (diff)
parentf834cd013865febdff3952b01bdd09b406c8ca66 (diff)
Merge branch 'remove-recursion-on-output'
Diffstat (limited to 'bs4/tests/test_formatter.py')
-rw-r--r--bs4/tests/test_formatter.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/bs4/tests/test_formatter.py b/bs4/tests/test_formatter.py
index 84d4e3b..528b16d 100644
--- a/bs4/tests/test_formatter.py
+++ b/bs4/tests/test_formatter.py
@@ -80,20 +80,20 @@ class TestFormatter(SoupTest):
@pytest.mark.parametrize(
"indent,expect",
[
- (None, '<a>\n<b>\ntext\n</b>\n</a>'),
- (-1, '<a>\n<b>\ntext\n</b>\n</a>'),
- (0, '<a>\n<b>\ntext\n</b>\n</a>'),
- ("", '<a>\n<b>\ntext\n</b>\n</a>'),
+ (None, '<a>\n<b>\ntext\n</b>\n</a>\n'),
+ (-1, '<a>\n<b>\ntext\n</b>\n</a>\n'),
+ (0, '<a>\n<b>\ntext\n</b>\n</a>\n'),
+ ("", '<a>\n<b>\ntext\n</b>\n</a>\n'),
- (1, '<a>\n <b>\n text\n </b>\n</a>'),
- (2, '<a>\n <b>\n text\n </b>\n</a>'),
+ (1, '<a>\n <b>\n text\n </b>\n</a>\n'),
+ (2, '<a>\n <b>\n text\n </b>\n</a>\n'),
- ("\t", '<a>\n\t<b>\n\t\ttext\n\t</b>\n</a>'),
- ('abc', '<a>\nabc<b>\nabcabctext\nabc</b>\n</a>'),
+ ("\t", '<a>\n\t<b>\n\t\ttext\n\t</b>\n</a>\n'),
+ ('abc', '<a>\nabc<b>\nabcabctext\nabc</b>\n</a>\n'),
# Some invalid inputs -- the default behavior is used.
- (object(), '<a>\n <b>\n text\n </b>\n</a>'),
- (b'bytes', '<a>\n <b>\n text\n </b>\n</a>'),
+ (object(), '<a>\n <b>\n text\n </b>\n</a>\n'),
+ (b'bytes', '<a>\n <b>\n text\n </b>\n</a>\n'),
]
)
def test_indent(self, indent, expect):