Exemplo n.º 1
0
def test_obj():
    history_obj = PromptToolkitHistory(load_prev=False)
    history_obj.append('line10')
    assert ['line10'] == history_obj.strings
    assert len(history_obj) == 1
    assert ['line10'] == [x for x in history_obj]
Exemplo n.º 2
0
def history_obj():
    """Instantiate `PromptToolkitHistory` and append a line string"""
    hist = PromptToolkitHistory(load_prev=False)
    hist.append('line10')
    return hist
Exemplo n.º 3
0
def test_obj():
    history_obj = PromptToolkitHistory(load_prev=False)
    history_obj.append('line10')
    yield assert_equal, ['line10'], history_obj.strings
    yield assert_equal, 1, len(history_obj)
    yield assert_equal, ['line10'], [x for x in history_obj]
Exemplo n.º 4
0
def test_obj():
    history_obj = PromptToolkitHistory(load_prev=False)
    history_obj.append('line10')
    yield assert_equal, ['line10'], history_obj.strings
    yield assert_equal, 1, len(history_obj)
    yield assert_equal, ['line10'], [x for x in history_obj]