def test_plain(self): assert shell.autodetect() == 'plain'
def test_ipython(self, monkeypatch): monkeypatch.setitem(sys.modules, 'IPython', mock.sentinel.bpython) assert shell.autodetect() == 'ipython'
def test_bpython(self, monkeypatch): monkeypatch.setitem(sys.modules, "bpython", mock.sentinel.bpython) assert shell.autodetect() == "bpython"
def test_plain(self): assert shell.autodetect() == "plain"
def test_bpython_over_ipython(self, monkeypatch): monkeypatch.setitem(sys.modules, "bpython", mock.sentinel.bpython) monkeypatch.setitem(sys.modules, "IPython", mock.sentinel.bpython) assert shell.autodetect() == "bpython"