Commit 37c702ce authored by Denis Bilenko's avatar Denis Bilenko

test__threadpool.py: better cleanup()

parent b00e23d5
......@@ -11,8 +11,10 @@ import six
class TestCase(greentest.TestCase):
def cleanup(self):
if self.pool is not None:
self.pool.kill()
pool = getattr(self, 'pool', None)
if pool is not None:
pool.kill()
del self.pool
class PoolBasicTests(TestCase):
......@@ -204,11 +206,6 @@ class TestJoinEmpty(TestCase):
self.pool = ThreadPool(1)
self.pool.join()
def cleanup(self):
# needed here because currently Greenlet.kill() switches out even if greenlet not started yet
# XXX fix Greenlet.kill
pass
class TestSpawn(TestCase):
switch_expected = True
......
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