예제 #1
0
    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'})
예제 #2
0
파일: shell_test.py 프로젝트: hypothesis/h
    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"}
        )
예제 #3
0
    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"
                                                   })
예제 #4
0
    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'
                                                   })