Commit 9c6db35a authored by Roger E. Masse's avatar Roger E. Masse

Revised test for errno ala bwarsaw's testing paradigm.

parent 8a51de4c
......@@ -2,10 +2,12 @@
"""Test the errno module
Roger E. Masse
"""
try:
import errno
except ImportError:
raise SystemExit
verbose = 0
if __name__ == '__main__':
verbose = 1
import errno
errors = ['E2BIG', 'EACCES', 'EADDRINUSE', 'EADDRNOTAVAIL', 'EADV',
'EAFNOSUPPORT', 'EAGAIN', 'EALREADY', 'EBADE', 'EBADF',
......@@ -41,4 +43,5 @@ errors = ['E2BIG', 'EACCES', 'EADDRINUSE', 'EADDRNOTAVAIL', 'EADV',
#
for error in errors:
a = getattr(errno, error)
# print a
if verbose:
print '%s: %d' % (error, a)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment