Revised test for errno ala bwarsaw's testing paradigm.

This commit is contained in:
Roger E. Masse 1996-12-16 20:40:20 +00:00
parent 8a51de4cdd
commit 9c6db35a1e
1 changed files with 8 additions and 5 deletions

View File

@ -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)