summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncore.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_asyncore.py')
-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 ed4c8a3..6973f4b 100644
--- a/Lib/test/test_asyncore.py
+++ b/Lib/test/test_asyncore.py
@@ -6,6 +6,7 @@ import socket
import sys
import time
import warnings
+import errno
from test import test_support
from test.test_support import TESTFN, run_unittest, unlink
@@ -323,6 +324,14 @@ class DispatcherTests(unittest.TestCase):
self.assertTrue(len(w) == 1)
self.assertTrue(issubclass(w[0].category, DeprecationWarning))
+ 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):