From 4fb1b928b7e32cce2059cadb96eae04d04605b16 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Wed, 14 Feb 2018 22:40:09 +0000 Subject: [PATCH] Adjust unittest for master -> parent split Tests should now match changes in 4d31300dd09ae7aaa394e53a48102167521f3f91 --- tests/data/id_allocation.py | 4 ++-- tests/first_stage_test.py | 4 ++-- tests/master_test.py | 6 ++++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/data/id_allocation.py b/tests/data/id_allocation.py index ce83f3fc..c9aa64b0 100644 --- a/tests/data/id_allocation.py +++ b/tests/data/id_allocation.py @@ -1,10 +1,10 @@ import mitogen.core -import mitogen.master +import mitogen.parent @mitogen.core.takes_econtext def allocate_an_id(econtext): - mitogen.master.upgrade_router(econtext) + mitogen.parent.upgrade_router(econtext) return econtext.router.allocate_id() diff --git a/tests/first_stage_test.py b/tests/first_stage_test.py index d9a11956..f7cbe467 100644 --- a/tests/first_stage_test.py +++ b/tests/first_stage_test.py @@ -3,7 +3,7 @@ import subprocess import unittest2 -import mitogen.master +import mitogen.parent import testlib @@ -17,7 +17,7 @@ class CommandLineTest(testlib.RouterMixin, testlib.TestCase): # * 3.x starting 2.7 def test_valid_syntax(self): - stream = mitogen.master.Stream(self.router, 0) + stream = mitogen.parent.Stream(self.router, 0) args = stream.get_boot_command() # Executing the boot command will print "EC0" and expect to read from diff --git a/tests/master_test.py b/tests/master_test.py index 7458f020..e010e8c8 100644 --- a/tests/master_test.py +++ b/tests/master_test.py @@ -6,6 +6,7 @@ import unittest2 import testlib import mitogen.master +import mitogen.parent class ScanCodeImportsTest(unittest2.TestCase): @@ -19,11 +20,12 @@ class ScanCodeImportsTest(unittest2.TestCase): (-1, 'unittest2', ()), (-1, 'testlib', ()), (-1, 'mitogen.master', ()), + (-1, 'mitogen.parent', ()), ]) class IterReadTest(unittest2.TestCase): - func = staticmethod(mitogen.master.iter_read) + func = staticmethod(mitogen.parent.iter_read) def make_proc(self): args = [testlib.data_path('iter_read_generator.sh')] @@ -75,7 +77,7 @@ class IterReadTest(unittest2.TestCase): class WriteAllTest(unittest2.TestCase): - func = staticmethod(mitogen.master.write_all) + func = staticmethod(mitogen.parent.write_all) def make_proc(self): args = [testlib.data_path('write_all_consumer.sh')]