Example #1
0
    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!')
Example #2
0
    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!"
        )
Example #3
0
    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!")
Example #4
0
    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!')