issue #477: more fork removal

issue510
David Wilson 6 years ago
parent 29cb6cb4f8
commit 6281f231cb

@ -38,7 +38,7 @@ class ContextTest(testlib.RouterMixin, testlib.TestCase):
# together (e.g. Ansible). # together (e.g. Ansible).
def test_mitogen_roundtrip(self): def test_mitogen_roundtrip(self):
c = self.router.fork() c = self.router.local()
r = mitogen.core.Receiver(self.router) r = mitogen.core.Receiver(self.router)
r.to_sender().send(c) r.to_sender().send(c)
c2 = r.get().unpickle() c2 = r.get().unpickle()
@ -47,7 +47,7 @@ class ContextTest(testlib.RouterMixin, testlib.TestCase):
self.assertEquals(c.name, c2.name) self.assertEquals(c.name, c2.name)
def test_vanilla_roundtrip(self): def test_vanilla_roundtrip(self):
c = self.router.fork() c = self.router.local()
c2 = pickle.loads(pickle.dumps(c)) c2 = pickle.loads(pickle.dumps(c))
self.assertEquals(None, c2.router) self.assertEquals(None, c2.router)
self.assertEquals(c.context_id, c2.context_id) self.assertEquals(c.context_id, c2.context_id)

@ -5,7 +5,7 @@ import testlib
import mitogen.core import mitogen.core
class Thing(): class Thing:
pass pass

@ -7,7 +7,6 @@ import time
import unittest2 import unittest2
import mitogen import mitogen
import mitogen.fork
import mitogen.master import mitogen.master
import mitogen.service import mitogen.service
import mitogen.unix import mitogen.unix

Loading…
Cancel
Save