Commit 61f93450 authored by Denis Bilenko's avatar Denis Bilenko

add patch_all helper to greentest

parent 2514dddd
......@@ -171,3 +171,12 @@ class GenericGetTestCase(TestCase):
delay = time.time() - start
assert 0.01 - 0.001 <= delay < 0.01 + 0.01 + 0.1, delay
def patch_all(timeout=None):
from gevent import monkey
monkey.patch_all(aggressive=True)
import unittest
unittest.TestCase = TestCase
if timeout is not None:
TestCase.__timeout__ = timeout
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