Coverage and correction on context_manager tests
This commit is contained in:
parent
62f3adb289
commit
eee8e2b3fc
|
|
@ -640,6 +640,12 @@ def test_context_call(init_list, expected, file_line):
|
||||||
ctx()
|
ctx()
|
||||||
|
|
||||||
|
|
||||||
|
def test_double_call():
|
||||||
|
ctx = context_mngr.ContextManager([sy.TextToken('test')])
|
||||||
|
c = ctx()
|
||||||
|
assert c == ctx()
|
||||||
|
|
||||||
|
|
||||||
def test_content_call_raises():
|
def test_content_call_raises():
|
||||||
ctx = context_mngr.ContextManager([sy.StructuralElementEndToken(["1"])])
|
ctx = context_mngr.ContextManager([sy.StructuralElementEndToken(["1"])])
|
||||||
with pytest.raises(error_mngr.MismatchedContainerError):
|
with pytest.raises(error_mngr.MismatchedContainerError):
|
||||||
|
|
|
||||||
|
|
@ -83,8 +83,14 @@ _list_classes_expected_value = [
|
||||||
sy.TextToken(['test7']),
|
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),
|
__GLk(1),
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue