test: add back xonfig-info test

This commit is contained in:
Noortheen Raja 2022-03-25 11:12:35 +05:30 committed by Gil Forsyth
parent fcf6f37d5b
commit 284f794132

View file

@ -90,3 +90,24 @@ class TestXonfigWeb:
def test_prompts_get(self, get_req):
_, _, resp = get_req("/prompts")
assert "Prompts" in resp
@pytest.mark.parametrize(
"args",
[
([]),
(
[
"info",
]
),
],
)
def test_xonfig_info(args, xession):
"""info works, and reports no jupyter if none in environment"""
capout = xonfig_main(args)
assert capout.startswith("+---")
assert capout.endswith("---+\n")
pat = re.compile(r".*history backend\s+\|\s+", re.MULTILINE | re.IGNORECASE)
m = pat.search(capout)
assert m