Coverage and correction on context_manager tests

This commit is contained in:
Maximilien Rigaut 2022-06-07 02:30:35 +02:00
parent 62f3adb289
commit eee8e2b3fc
No known key found for this signature in database
GPG Key ID: 4F14B23709ADA5B1
2 changed files with 13 additions and 1 deletions

View File

@ -640,6 +640,12 @@ def test_context_call(init_list, expected, file_line):
ctx()
def test_double_call():
ctx = context_mngr.ContextManager([sy.TextToken('test')])
c = ctx()
assert c == ctx()
def test_content_call_raises():
ctx = context_mngr.ContextManager([sy.StructuralElementEndToken(["1"])])
with pytest.raises(error_mngr.MismatchedContainerError):

View File

@ -83,8 +83,14 @@ _list_classes_expected_value = [
sy.TextToken(['test7']),
]),
]),
sy.Linebreak(["\n"]),
sy.EtUlistToken([
context_mngr.TextContainer([
sy.TextToken(['test8']),
]),
]),
]),
"<ul>\n<li>test7</li></ul>",
"<ul>\n<li>test7</li>\n<li>test8</li></ul>",
__GLk(1),
],
[