2021-05-11 22:23:57 +03:00
|
|
|
"""Tests the dummy history backend."""
|
|
|
|
# pylint: disable=protected-access
|
|
|
|
|
|
|
|
from xonsh.history.dummy import DummyHistory
|
|
|
|
from xonsh.history.main import construct_history
|
|
|
|
|
2021-05-20 15:44:26 +05:30
|
|
|
|
|
|
|
def test_construct_history_str(xession):
|
|
|
|
xession.env["XONSH_HISTORY_BACKEND"] = "dummy"
|
2021-05-11 22:23:57 +03:00
|
|
|
assert isinstance(construct_history(), DummyHistory)
|
|
|
|
|
|
|
|
|
2021-05-20 15:44:26 +05:30
|
|
|
def test_construct_history_class(xession):
|
|
|
|
xession.env["XONSH_HISTORY_BACKEND"] = DummyHistory
|
2021-05-11 22:23:57 +03:00
|
|
|
assert isinstance(construct_history(), DummyHistory)
|
|
|
|
|
|
|
|
|
2021-05-20 15:44:26 +05:30
|
|
|
def test_construct_history_instance(xession):
|
|
|
|
xession.env["XONSH_HISTORY_BACKEND"] = DummyHistory()
|
2021-05-11 22:23:57 +03:00
|
|
|
assert isinstance(construct_history(), DummyHistory)
|