##// END OF EJS Templates
Start each test with clear engine namespaces...
MinRK -
Show More
@@ -93,6 +93,8 b' class ClusterTestCase(BaseZMQTestCase):'
93 def setUp(self):
93 def setUp(self):
94 BaseZMQTestCase.setUp(self)
94 BaseZMQTestCase.setUp(self)
95 self.client = self.connect_client()
95 self.client = self.connect_client()
96 # start every test with clean engine namespaces:
97 self.client.clear(block=True)
96 self.base_engine_count=len(self.client.ids)
98 self.base_engine_count=len(self.client.ids)
97 self.engines=[]
99 self.engines=[]
98
100
@@ -85,8 +85,8 b' class TestClient(ClusterTestCase):'
85 v.push(dict(a=5))
85 v.push(dict(a=5))
86 v.pull('a')
86 v.pull('a')
87 id0 = self.client.ids[-1]
87 id0 = self.client.ids[-1]
88 self.client.clear(targets=id0)
88 self.client.clear(targets=id0, block=True)
89 self.client[:-1].pull('a')
89 a = self.client[:-1].get('a')
90 self.assertRaisesRemote(NameError, self.client[id0].get, 'a')
90 self.assertRaisesRemote(NameError, self.client[id0].get, 'a')
91 self.client.clear(block=True)
91 self.client.clear(block=True)
92 for i in self.client.ids:
92 for i in self.client.ids:
@@ -298,7 +298,8 b' class TestView(ClusterTestCase):'
298 def findall(pat, s):
298 def findall(pat, s):
299 # this globals() step isn't necessary in real code
299 # this globals() step isn't necessary in real code
300 # only to prevent a closure in the test
300 # only to prevent a closure in the test
301 return globals()['re'].findall(pat, s)
301 re = globals()['re']
302 return re.findall(pat, s)
302
303
303 self.assertEquals(view.apply_sync(findall, '\w+', 'hello world'), 'hello world'.split())
304 self.assertEquals(view.apply_sync(findall, '\w+', 'hello world'), 'hello world'.split())
304
305
General Comments 0
You need to be logged in to leave comments. Login now