def test_plain(self, monkeypatch): fake_code = mock.Mock(spec_set=['interact']) monkeypatch.setitem(sys.modules, 'code', fake_code) shell.plain(foo='bar', baz='qux') fake_code.interact.assert_called_once_with(banner='custom banner!', local={'foo': 'bar', 'baz': 'qux'})
def test_plain(self, monkeypatch): fake_code = mock.Mock(spec_set=["interact"]) monkeypatch.setitem(sys.modules, "code", fake_code) shell.plain(foo="bar", baz="qux") fake_code.interact.assert_called_once_with( banner="custom banner!", local={"foo": "bar", "baz": "qux"} )
def test_plain(self, monkeypatch): fake_code = mock.Mock(spec_set=["interact"]) monkeypatch.setitem(sys.modules, "code", fake_code) shell.plain(foo="bar", baz="qux") fake_code.interact.assert_called_once_with(banner="custom banner!", local={ "foo": "bar", "baz": "qux" })
def test_plain(self, monkeypatch): fake_code = mock.Mock(spec_set=['interact']) monkeypatch.setitem(sys.modules, 'code', fake_code) shell.plain(foo='bar', baz='qux') fake_code.interact.assert_called_once_with(banner='custom banner!', local={ 'foo': 'bar', 'baz': 'qux' })