示例#1
0
 def test_plain(self):
     assert shell.autodetect() == 'plain'
示例#2
0
 def test_ipython(self, monkeypatch):
     monkeypatch.setitem(sys.modules, 'IPython', mock.sentinel.bpython)
     assert shell.autodetect() == 'ipython'
示例#3
0
 def test_bpython(self, monkeypatch):
     monkeypatch.setitem(sys.modules, "bpython", mock.sentinel.bpython)
     assert shell.autodetect() == "bpython"
示例#4
0
 def test_plain(self):
     assert shell.autodetect() == "plain"
示例#5
0
 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"
示例#6
0
 def test_ipython(self, monkeypatch):
     monkeypatch.setitem(sys.modules, 'IPython', mock.sentinel.bpython)
     assert shell.autodetect() == 'ipython'