summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_epoll.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-08-13 08:51:18 (GMT)
committerGeorg Brandl <georg@python.org>2009-08-13 08:51:18 (GMT)
commitab91fdef1f1e556203a2eee98ba7d379e4790de9 (patch)
tree6f8f00dc18cc5f2801a675df277c2c595eb85ec8 /Lib/test/test_epoll.py
parentef82be368abdea8e8032500e7ecc3a22f5f07851 (diff)
downloadcpython-ab91fdef1f1e556203a2eee98ba7d379e4790de9.zip
cpython-ab91fdef1f1e556203a2eee98ba7d379e4790de9.tar.gz
cpython-ab91fdef1f1e556203a2eee98ba7d379e4790de9.tar.bz2
Merged revisions 73715 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k ........ r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line convert old fail* assertions to assert* ........
Diffstat (limited to 'Lib/test/test_epoll.py')
-rw-r--r--Lib/test/test_epoll.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/Lib/test/test_epoll.py b/Lib/test/test_epoll.py
index ab6bf0b..847b991 100644
--- a/Lib/test/test_epoll.py
+++ b/Lib/test/test_epoll.py
@@ -71,10 +71,10 @@ class TestEPoll(unittest.TestCase):
ep = select.epoll(16)
except OSError as e:
raise AssertionError(str(e))
- self.assert_(ep.fileno() > 0, ep.fileno())
- self.assert_(not ep.closed)
+ self.assertTrue(ep.fileno() > 0, ep.fileno())
+ self.assertTrue(not ep.closed)
ep.close()
- self.assert_(ep.closed)
+ self.assertTrue(ep.closed)
self.assertRaises(ValueError, ep.fileno)
def test_badcreate(self):
@@ -141,7 +141,7 @@ class TestEPoll(unittest.TestCase):
try:
ep2.poll(1, 4)
except IOError as e:
- self.failUnlessEqual(e.args[0], errno.EBADF, e)
+ self.assertEqual(e.args[0], errno.EBADF, e)
else:
self.fail("epoll on closed fd didn't raise EBADF")
@@ -157,7 +157,7 @@ class TestEPoll(unittest.TestCase):
now = time.time()
events = ep.poll(1, 4)
then = time.time()
- self.failIf(then - now > 0.1, then - now)
+ self.assertFalse(then - now > 0.1, then - now)
events.sort()
expected = [(client.fileno(), select.EPOLLOUT),
@@ -165,12 +165,12 @@ class TestEPoll(unittest.TestCase):
expected.sort()
self.assertEquals(events, expected)
- self.failIf(then - now > 0.01, then - now)
+ self.assertFalse(then - now > 0.01, then - now)
now = time.time()
events = ep.poll(timeout=2.1, maxevents=4)
then = time.time()
- self.failIf(events)
+ self.assertFalse(events)
client.send(b"Hello!")
server.send(b"world!!!")
@@ -178,7 +178,7 @@ class TestEPoll(unittest.TestCase):
now = time.time()
events = ep.poll(1, 4)
then = time.time()
- self.failIf(then - now > 0.01)
+ self.assertFalse(then - now > 0.01)
events.sort()
expected = [(client.fileno(), select.EPOLLIN | select.EPOLLOUT),
@@ -192,7 +192,7 @@ class TestEPoll(unittest.TestCase):
now = time.time()
events = ep.poll(1, 4)
then = time.time()
- self.failIf(then - now > 0.01)
+ self.assertFalse(then - now > 0.01)
expected = [(server.fileno(), select.EPOLLOUT)]
self.assertEquals(events, expected)
@@ -211,7 +211,7 @@ class TestEPoll(unittest.TestCase):
now = time.time()
events = ep.poll(1, 4)
then = time.time()
- self.failIf(then - now > 0.01)
+ self.assertFalse(then - now > 0.01)
server.close()
ep.unregister(fd)