Пример #1
0
 def test_terminate_raise_EOFError(self):
     t = system.sys_transport()
     self.assertRaises(EOFError, t.terminate)
Пример #2
0
 def run(self, factory):
     session = factory(system.sys_transport())
     session.on_begin(True)
     self._loop(session)
     session.on_end()
Пример #3
0
 def test_write_uses_sys_stdout(self):
     with h.mock_value(sys, "stdout") as mymock:
         t = system.sys_transport()
         t.write("foobar")
         mymock[0].write.assert_called_with("foobar")