def test_bpython(self, monkeypatch): fake_bpython = mock.Mock(spec_set=['embed']) monkeypatch.setitem(sys.modules, 'bpython', fake_bpython) shell.bpython(foo='bar', baz='qux') fake_bpython.embed.assert_called_once_with({'foo': 'bar', 'baz': 'qux'}, banner='custom banner!')
def test_bpython(self, monkeypatch): fake_bpython = mock.Mock(spec_set=["embed"]) monkeypatch.setitem(sys.modules, "bpython", fake_bpython) shell.bpython(foo="bar", baz="qux") fake_bpython.embed.assert_called_once_with( {"foo": "bar", "baz": "qux"}, banner="custom banner!" )
def test_bpython(self, monkeypatch): fake_bpython = mock.Mock(spec_set=["embed"]) monkeypatch.setitem(sys.modules, "bpython", fake_bpython) shell.bpython(foo="bar", baz="qux") fake_bpython.embed.assert_called_once_with({ "foo": "bar", "baz": "qux" }, banner="custom banner!")
def test_bpython(self, monkeypatch): fake_bpython = mock.Mock(spec_set=['embed']) monkeypatch.setitem(sys.modules, 'bpython', fake_bpython) shell.bpython(foo='bar', baz='qux') fake_bpython.embed.assert_called_once_with({ 'foo': 'bar', 'baz': 'qux' }, banner='custom banner!')