summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_errno.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_errno.py')
-rwxr-xr-xLib/test/test_errno.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/Lib/test/test_errno.py b/Lib/test/test_errno.py
index d248fff..a7c77fa 100755
--- a/Lib/test/test_errno.py
+++ b/Lib/test/test_errno.py
@@ -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)