Commit 67ae3668 authored by Denis Bilenko's avatar Denis Bilenko

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

parent 29261f08
......@@ -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