diff options
author | Roger E. Masse <rmasse@newcnri.cnri.reston.va.us> | 1996-12-16 20:20:33 (GMT) |
---|---|---|
committer | Roger E. Masse <rmasse@newcnri.cnri.reston.va.us> | 1996-12-16 20:20:33 (GMT) |
commit | 8ba76d3cf38a9aaec3bdea9f13b52d8e8a03915e (patch) | |
tree | fc2907c4ecf274a7056910e97bcfc6794553fab5 /Lib/test/test_errno.py | |
parent | 529fcfe31f61fe499564f6778774f61c19671681 (diff) | |
download | cpython-8ba76d3cf38a9aaec3bdea9f13b52d8e8a03915e.zip cpython-8ba76d3cf38a9aaec3bdea9f13b52d8e8a03915e.tar.gz cpython-8ba76d3cf38a9aaec3bdea9f13b52d8e8a03915e.tar.bz2 |
Added test_errno to the test suite
Diffstat (limited to 'Lib/test/test_errno.py')
-rwxr-xr-x | Lib/test/test_errno.py | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Lib/test/test_errno.py b/Lib/test/test_errno.py new file mode 100755 index 0000000..d248fff --- /dev/null +++ b/Lib/test/test_errno.py @@ -0,0 +1,44 @@ +#! /usr/bin/env python +"""Test the errno module + Roger E. Masse +""" +try: + import errno +except ImportError: + raise SystemExit + +errors = ['E2BIG', 'EACCES', 'EADDRINUSE', 'EADDRNOTAVAIL', 'EADV', + 'EAFNOSUPPORT', 'EAGAIN', 'EALREADY', 'EBADE', 'EBADF', + 'EBADFD', 'EBADMSG', 'EBADR', 'EBADRQC', 'EBADSLT', + 'EBFONT', 'EBUSY', 'ECHILD', 'ECHRNG', 'ECOMM', + 'ECONNABORTED', 'ECONNREFUSED', 'ECONNRESET', + 'EDEADLK', 'EDEADLOCK', 'EDESTADDRREQ', 'EDOM', + 'EDQUOT', 'EEXIST', 'EFAULT', 'EFBIG', 'EHOSTDOWN', + 'EHOSTUNREACH', 'EIDRM', 'EILSEQ', 'EINPROGRESS', + 'EINTR', 'EINVAL', 'EIO', 'EISCONN', 'EISDIR', + 'EL2HLT', 'EL2NSYNC', 'EL3HLT', 'EL3RST', 'ELIBACC', + 'ELIBBAD', 'ELIBEXEC', 'ELIBMAX', 'ELIBSCN', 'ELNRNG', + 'ELOOP', 'EMFILE', 'EMLINK', 'EMSGSIZE', 'EMULTIHOP', + 'ENAMETOOLONG', 'ENETDOWN', 'ENETRESET', 'ENETUNREACH', + 'ENFILE', 'ENOANO', 'ENOBUFS', 'ENOCSI', 'ENODATA', + 'ENODEV', 'ENOENT', 'ENOEXEC', 'ENOLCK', 'ENOLINK', + 'ENOMEM', 'ENOMSG', 'ENONET', 'ENOPKG', 'ENOPROTOOPT', + 'ENOSPC', 'ENOSR', 'ENOSTR', 'ENOSYS', 'ENOTBLK', + 'ENOTCONN', 'ENOTDIR', 'ENOTEMPTY', 'ENOTSOCK', + 'ENOTTY', 'ENOTUNIQ', 'ENXIO', 'EOPNOTSUPP', + 'EOVERFLOW', 'EPERM', 'EPFNOSUPPORT', 'EPIPE', + 'EPROTO', 'EPROTONOSUPPORT', 'EPROTOTYPE', + 'ERANGE', 'EREMCHG', 'EREMOTE', 'ERESTART', + 'EROFS', 'ESHUTDOWN', 'ESOCKTNOSUPPORT', 'ESPIPE', + 'ESRCH', 'ESRMNT', 'ESTALE', 'ESTRPIPE', 'ETIME', + 'ETIMEDOUT', 'ETOOMANYREFS', 'ETXTBSY', 'EUNATCH', + 'EUSERS', 'EWOULDBLOCK', 'EXDEV', 'EXFULL'] + +# +# This is is a wee bit bogus since the module pnly conditionally adds +# errno constants if they have been defined by errno.h However, this +# test seems to work on SGI, Sparc & intel Solaris, and linux. +# +for error in errors: + a = getattr(errno, error) + # print a |