summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-06-23 16:50:10 +0200
committerVictor Stinner <victor.stinner@gmail.com>2014-06-23 16:50:10 +0200
commit5f03ae46f84c495385c0c2da3d6c1123fd113f65 (patch)
treee3dd9173e2746e8a2f2a975b9617f98a5a6a9791
parentd8fac615bac091c190f84d4f48092f0f381a92b7 (diff)
downloadtrollius-5f03ae46f84c495385c0c2da3d6c1123fd113f65.tar.gz
Fix some tests on PyPy
-rw-r--r--tests/test_events.py2
-rw-r--r--tests/test_queues.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_events.py b/tests/test_events.py
index 5270607..d497637 100644
--- a/tests/test_events.py
+++ b/tests/test_events.py
@@ -1850,7 +1850,7 @@ class HandleTests(test_utils.TestCase):
if sys.version_info >= (3,):
partial_regex = r'functools.partial\(<function noop .*>\)'
else:
- partial_regex = r'<functools.partial object at 0x[a-f0-9]+>'
+ partial_regex = r'<_?functools.partial object at 0x[a-f0-9]+>'
regex = (r'^Handle\(%s at %s:%s, '
r'\(\)\)$' % (partial_regex, re.escape(filename), lineno))
self.assertRegex(repr(h), regex)
diff --git a/tests/test_queues.py b/tests/test_queues.py
index 7ea1294..88f36c1 100644
--- a/tests/test_queues.py
+++ b/tests/test_queues.py
@@ -33,7 +33,7 @@ class QueueBasicTests(_QueueTestBase):
q = asyncio.Queue(loop=loop)
self.assertTrue(fn(q).startswith('<Queue'), fn(q))
- id_is_present = hex(id(q)) in fn(q)
+ id_is_present = ("%x" % id(q)) in fn(q)
self.assertEqual(expect_id, id_is_present)
@asyncio.coroutine