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

Use the customized lock_tests under PyPy

parent 44d93f00
......@@ -3,7 +3,7 @@
Native thread-based hostname resolver.
"""
import _socket
from gevent._compat import text_type
from gevent.hub import get_hub
......@@ -11,7 +11,7 @@ __all__ = ['Resolver']
# 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):
......
This diff is collapsed.
......@@ -44,7 +44,7 @@ class TimeAssertMixin(object):
if sysinfo.EXPECT_POOR_TIMER_RESOLUTION:
# pylint:disable=unused-argument
def assertTimeWithinRange(self, delay, min_time, max_time):
def assertTimeWithinRange(self, time_taken, min_time, max_time):
return
else:
def assertTimeWithinRange(self, time_taken, min_time, max_time):
......
......@@ -423,7 +423,8 @@ class ConditionTests(BaseTestCase):
Bunch(f, N).wait_for_finished()
self.assertEqual(len(results), 5)
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):
......
......@@ -32,11 +32,11 @@ def TESTRUNNER(tests=None):
if 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:
tests = glob.glob('%s/test_*.py' % directory)
version_tests = glob.glob('%s/test_*.py' % full_directory)
tests = sorted(tests)
version_tests = sorted(version_tests)
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