summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_errno.py
diff options
context:
space:
mode:
authorRoger E. Masse <rmasse@newcnri.cnri.reston.va.us>1996-12-16 20:40:20 (GMT)
committerRoger E. Masse <rmasse@newcnri.cnri.reston.va.us>1996-12-16 20:40:20 (GMT)
commit9c6db35a1e725168f451cdb00f5fe14d4674240a (patch)
tree4f69168cef861ccd96dd6af44ffa32ea1a2ad6ec /Lib/test/test_errno.py
parent8a51de4cdd4ed533048cbbfb30ef32c5044bbb1f (diff)
downloadcpython-9c6db35a1e725168f451cdb00f5fe14d4674240a.zip
cpython-9c6db35a1e725168f451cdb00f5fe14d4674240a.tar.gz
cpython-9c6db35a1e725168f451cdb00f5fe14d4674240a.tar.bz2
Revised test for errno ala bwarsaw's testing paradigm.
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)