Commit 2f74d6a6 authored by Denis Bilenko's avatar Denis Bilenko

test__pool.py: avoid creating new functions in a test case

--HG--
extra : transplant_source : n%DB%87%A1X%A2%1ES%BB%5D%F7%F3O%86%ECN%E7%02%BB%9B
parent efb3f3eb
......@@ -86,12 +86,6 @@ class TestCoroutinePool(greentest.TestCase):
import sys
pool = self.klass(size=1)
def crash(*args, **kw):
raise RuntimeError("Whoa")
class FakeFile(object):
write = crash
# 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
......@@ -118,6 +112,14 @@ class TestCoroutinePool(greentest.TestCase):
pool.join()
def crash(*args, **kw):
raise RuntimeError("Whoa")
class FakeFile(object):
write = crash
class PoolBasicTests(greentest.TestCase):
klass = pool.Pool
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment