Skip tests if it's pypy

This commit is contained in:
bjmb
2017-03-31 16:24:16 -04:00
parent 4c9ede85a6
commit a6991be255
2 changed files with 4 additions and 1 deletions

View File

@@ -58,3 +58,4 @@ def is_monkey_patched():
return is_gevent_monkey_patched() or is_eventlet_monkey_patched()
notwindows = unittest.skipUnless(not "Windows" in platform.system(), "This test is not adequate for windows")
notpypy = unittest.skipUnless(not '__pypy__' in sys.builtin_module_names, "This tests is not suitable for pypy")

View File

@@ -19,8 +19,8 @@ except ImportError:
import unittest # noqa
from tests.unit.io.utils import TimerConnectionTests
from tests import is_eventlet_time_monkey_patched, is_gevent_time_monkey_patched
from tests.unit.io.eventlet_utils import restore_saved_module
from tests import notpypy
import time
from eventlet import monkey_patch
@@ -31,7 +31,9 @@ except ImportError:
class EventletTimerTest(unittest.TestCase, TimerConnectionTests):
@notpypy
def setUp(self):
#There are some issues with some versions of pypy and eventlet
if not EventletConnection:
raise unittest.SkipTest("Can't test eventlet without monkey patching")
monkey_patch(time=True)