summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorGiampaolo RodolĂ  <g.rodola@gmail.com>2010-05-18 20:13:43 (GMT)
committerGiampaolo RodolĂ  <g.rodola@gmail.com>2010-05-18 20:13:43 (GMT)
commit19531db0b8cb2c7926453d935615cbd2eb687ed1 (patch)
tree2d6309245bca7dc11f99f46a6fc5a1f224b8f4e2 /Lib/test
parentbb35b21bce90e6a9c75367a7345e293b69fd9745 (diff)
downloadcpython-19531db0b8cb2c7926453d935615cbd2eb687ed1.zip
cpython-19531db0b8cb2c7926453d935615cbd2eb687ed1.tar.gz
cpython-19531db0b8cb2c7926453d935615cbd2eb687ed1.tar.bz2
Merged revisions 81299 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81299 | giampaolo.rodola | 2010-05-18 22:11:58 +0200 (mar, 18 mag 2010) | 9 lines Merged revisions 81294 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81294 | giampaolo.rodola | 2010-05-18 22:04:31 +0200 (mar, 18 mag 2010) | 1 line Fix issue #8573 (asyncore._strerror bug): fixed os.strerror typo; included NameError in the tuple of expected exception; added test case for asyncore._strerror. ........ ................
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_asyncore.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py
index 4db29ca..785b211 100644
--- a/Lib/test/test_asyncore.py
+++ b/Lib/test/test_asyncore.py
@@ -6,6 +6,7 @@ import socket
import threading
import sys
import time
+import errno
from test import support
from test.support import TESTFN, run_unittest, unlink
@@ -315,6 +316,14 @@ class DispatcherTests(unittest.TestCase):
# test cheap inheritance with the underlying socket
self.assertEqual(d.family, socket.AF_INET)
+ def test_strerror(self):
+ # refers to bug #8573
+ err = asyncore._strerror(errno.EPERM)
+ if hasattr(os, 'strerror'):
+ self.assertEqual(err, os.strerror(errno.EPERM))
+ err = asyncore._strerror(-1)
+ self.assertTrue("unknown error" in err.lower())
+
class dispatcherwithsend_noread(asyncore.dispatcher_with_send):
def readable(self):