[Python-checkins] cpython (merge 3.4 -> default): Merge 3.4
victor.stinner
python-checkins at python.org
Tue Mar 25 12:51:27 CET 2014
http://hg.python.org/cpython/rev/6a0def54c63d
changeset: 89975:6a0def54c63d
parent: 89972:6f80ca0012ae
parent: 89974:945d7dd3b455
user: Victor Stinner <victor.stinner at gmail.com>
date: Tue Mar 25 12:51:08 2014 +0100
summary:
Merge 3.4
files:
Lib/test/test_epoll.py | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/Lib/test/test_epoll.py b/Lib/test/test_epoll.py
--- a/Lib/test/test_epoll.py
+++ b/Lib/test/test_epoll.py
@@ -163,9 +163,9 @@
ep.register(client.fileno(),
select.EPOLLIN | select.EPOLLOUT | select.EPOLLET)
- now = time.time()
+ now = time.monotonic()
events = ep.poll(1, 4)
- then = time.time()
+ then = time.monotonic()
self.assertFalse(then - now > 0.1, then - now)
events.sort()
@@ -174,19 +174,16 @@
expected.sort()
self.assertEqual(events, expected)
- self.assertFalse(then - now > 0.01, then - now)
- now = time.time()
events = ep.poll(timeout=2.1, maxevents=4)
- then = time.time()
self.assertFalse(events)
client.send(b"Hello!")
server.send(b"world!!!")
- now = time.time()
+ now = time.monotonic()
events = ep.poll(1, 4)
- then = time.time()
+ then = time.monotonic()
self.assertFalse(then - now > 0.01)
events.sort()
@@ -198,9 +195,9 @@
ep.unregister(client.fileno())
ep.modify(server.fileno(), select.EPOLLOUT)
- now = time.time()
+ now = time.monotonic()
events = ep.poll(1, 4)
- then = time.time()
+ then = time.monotonic()
self.assertFalse(then - now > 0.01)
expected = [(server.fileno(), select.EPOLLOUT)]
@@ -217,9 +214,9 @@
ep = select.epoll(16)
ep.register(server)
- now = time.time()
+ now = time.monotonic()
events = ep.poll(1, 4)
- then = time.time()
+ then = time.monotonic()
self.assertFalse(then - now > 0.01)
server.close()
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list