From c68c837940670782903e63dbf2d5ae219e5dd003 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 19 May 2009 17:39:12 +0700 Subject: [PATCH] coros_test.py: kill trailing whitespace --- greentest/coros_test.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/greentest/coros_test.py b/greentest/coros_test.py index b5d1c75..4f52344 100644 --- a/greentest/coros_test.py +++ b/greentest/coros_test.py @@ -75,7 +75,7 @@ class TestEvent(tests.TestCase): # def cancel_event(): # evt.cancel(current) # api.spawn(cancel_event) -# +# # self.assertRaises(coros.Cancelled, evt.wait) def test_reset(self): @@ -83,7 +83,7 @@ class TestEvent(tests.TestCase): # calling reset before send should throw self.assertRaises(AssertionError, evt.reset) - + value = 'some stuff' def send_to_event(): evt.send(value) @@ -168,7 +168,7 @@ class TestCoroutinePool(tests.TestCase): # t = worker.wait() # api.sleep(0) # self.assertEquals(t.cancelled, True) - + def test_reentrant(self): pool = coros.CoroutinePool(0,1) def reenter(): @@ -182,10 +182,10 @@ class TestCoroutinePool(tests.TestCase): def reenter_async(): pool.execute_async(lambda a: a, 'reenter') evt.send('done') - + pool.execute_async(reenter_async) evt.wait() - + def test_horrible_main_loop_death(self): # testing the case that causes the run_forever # method to exit unwantedly @@ -194,8 +194,8 @@ class TestCoroutinePool(tests.TestCase): raise RuntimeError("Whoa") class FakeFile(object): write = crash - - # we're going to do this by causing the traceback.print_exc in + + # we're going to do this by causing the traceback.print_exc in # safe_apply to raise an exception and thus exit _main_loop normal_err = sys.stderr try: @@ -307,7 +307,7 @@ class TestActor(tests.TestCase): raise RuntimeError() else: msgs.append(message) - + self.actor.received = received evt = coros.event() @@ -326,16 +326,16 @@ class TestActor(tests.TestCase): total[0] += value ev.send() self.actor.received = received - + def onemoment(): api.sleep(0.1) - + evt = coros.event() evt1 = coros.event() - + self.actor.cast( (onemoment, evt, 1) ) self.actor.cast( (lambda: None, evt1, 2) ) - + evt1.wait() self.assertEqual(total[0], 2) # both coroutines should have been used