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"])
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> "
def test_completer5(mio): skip("XXX: Broken") completer = Completer(mio) assert completer.complete("", 0) == "Core" assert completer.complete("", len(completer.matches)) is None
def test_completer4(mio): completer = Completer(mio) assert completer.complete("Root asdf ", 0) is None
def test_completer3(mio): skip("XXX: Broken") completer = Completer(mio) assert completer.complete("Root bu", 0) == "Root builtins"
def test_completer2(mio): skip("XXX: Broken") completer = Completer(mio) assert completer.complete("Root ", 0) == "Root Core"