Commit 689538e5 authored by Jason Madden's avatar Jason Madden

Use the customized lock_tests under PyPy

parent 44d93f00
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Native thread-based hostname resolver. Native thread-based hostname resolver.
""" """
import _socket import _socket
from gevent._compat import text_type
from gevent.hub import get_hub from gevent.hub import get_hub
...@@ -11,7 +11,7 @@ __all__ = ['Resolver'] ...@@ -11,7 +11,7 @@ __all__ = ['Resolver']
# trigger import of encodings.idna to avoid https://github.com/gevent/gevent/issues/349 # trigger import of encodings.idna to avoid https://github.com/gevent/gevent/issues/349
text_type('foo').encode('idna') u'foo'.encode('idna')
class Resolver(object): class Resolver(object):
......
This diff is collapsed.
...@@ -44,7 +44,7 @@ class TimeAssertMixin(object): ...@@ -44,7 +44,7 @@ class TimeAssertMixin(object):
if sysinfo.EXPECT_POOR_TIMER_RESOLUTION: if sysinfo.EXPECT_POOR_TIMER_RESOLUTION:
# pylint:disable=unused-argument # pylint:disable=unused-argument
def assertTimeWithinRange(self, delay, min_time, max_time): def assertTimeWithinRange(self, time_taken, min_time, max_time):
return return
else: else:
def assertTimeWithinRange(self, time_taken, min_time, max_time): def assertTimeWithinRange(self, time_taken, min_time, max_time):
......
...@@ -423,7 +423,8 @@ class ConditionTests(BaseTestCase): ...@@ -423,7 +423,8 @@ class ConditionTests(BaseTestCase):
Bunch(f, N).wait_for_finished() Bunch(f, N).wait_for_finished()
self.assertEqual(len(results), 5) self.assertEqual(len(results), 5)
for dt in results: for dt in results:
self.assertTrue(dt >= 0.19, dt) # XXX: libuv sometimes produces 0.19958 # XXX: libuv sometimes produces 0.19958
self.assertTimeWithinRange(dt, 0.2, 2.0)
class BaseSemaphoreTests(BaseTestCase): class BaseSemaphoreTests(BaseTestCase):
......
...@@ -32,11 +32,11 @@ def TESTRUNNER(tests=None): ...@@ -32,11 +32,11 @@ def TESTRUNNER(tests=None):
if preferred_version != version: if preferred_version != version:
util.log('WARNING: The tests in %s/ are from version %s and your Python is %s', directory, preferred_version, version) util.log('WARNING: The tests in %s/ are from version %s and your Python is %s', directory, preferred_version, version)
version_tests = glob.glob('%s/test_*.py' % full_directory)
version_tests = sorted(version_tests)
if not tests: if not tests:
tests = glob.glob('%s/test_*.py' % directory) tests = glob.glob('%s/test_*.py' % directory)
version_tests = glob.glob('%s/test_*.py' % full_directory)
tests = sorted(tests) tests = sorted(tests)
version_tests = sorted(version_tests)
PYTHONPATH = (os.getcwd() + os.pathsep + get_absolute_pythonpath()).rstrip(':') PYTHONPATH = (os.getcwd() + os.pathsep + get_absolute_pythonpath()).rstrip(':')
......
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