Ejemplo n.º 1
0
def test_completer7(mio, capfd):
    completer = Completer(mio)

    completer.display_matches("Root", ["Root Core"] * 100, 9)

    out, err = capfd.readouterr()
    assert set(out.split()[:-1]) == set(["Core"])
Ejemplo n.º 2
0
def test_completer6(mio, capfd):
    completer = Completer(mio)

    completer.display_matches("Root", ["Root Core", "Root Types"], 10)

    out, err = capfd.readouterr()
    assert out == "\n Core        Types      \nmio> "
Ejemplo n.º 3
0
def test_completer5(mio):
    skip("XXX: Broken")

    completer = Completer(mio)
    assert completer.complete("", 0) == "Core"

    assert completer.complete("", len(completer.matches)) is None
Ejemplo n.º 4
0
def test_completer4(mio):
    completer = Completer(mio)

    assert completer.complete("Root asdf ", 0) is None
Ejemplo n.º 5
0
def test_completer3(mio):
    skip("XXX: Broken")

    completer = Completer(mio)

    assert completer.complete("Root bu", 0) == "Root builtins"
Ejemplo n.º 6
0
def test_completer2(mio):
    skip("XXX: Broken")

    completer = Completer(mio)

    assert completer.complete("Root ", 0) == "Root Core"