diff options
author | Guido van Rossum <guido@python.org> | 1996-12-10 16:02:14 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-12-10 16:02:14 (GMT) |
commit | 5de1f8dac84da8688823688a4f90f36dbbc1af1d (patch) | |
tree | 5eae1a4d451d15ea3dc6c2b9019c6ea5db2488e5 /Lib/dos-8x3/test_tim.py | |
parent | bd01374da88d1cbadf111bfdeb0d7c4b2f0629c6 (diff) | |
download | cpython-5de1f8dac84da8688823688a4f90f36dbbc1af1d.zip cpython-5de1f8dac84da8688823688a4f90f36dbbc1af1d.tar.gz cpython-5de1f8dac84da8688823688a4f90f36dbbc1af1d.tar.bz2 |
The usual; added several test modules, too.
Diffstat (limited to 'Lib/dos-8x3/test_tim.py')
-rw-r--r-- | Lib/dos-8x3/test_tim.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Lib/dos-8x3/test_tim.py b/Lib/dos-8x3/test_tim.py new file mode 100644 index 0000000..bfc768a --- /dev/null +++ b/Lib/dos-8x3/test_tim.py @@ -0,0 +1,36 @@ +import time + +time.altzone +time.clock() +t = time.time() +time.asctime(time.gmtime(t)) +if time.ctime(t) <> time.asctime(time.localtime(t)): + print 'time.ctime(t) <> time.asctime(time.localtime(t))' + +time.daylight +if int(time.mktime(time.localtime(t))) <> int(t): + print 'time.mktime(time.localtime(t)) <> t' + +time.sleep(1.2) +tt = time.gmtime(t) +for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'E', 'H', 'I', + 'j', 'm', 'M', 'n', 'N', 'o', 'p', 'S', 't', + 'U', 'w', 'W', 'x', 'X', 'y', 'Y', 'Z', '%'): + format = '%' + directive + time.strftime(format, tt) + +time.timezone +time.tzname + +# expected errors +try: + time.asctime(0) +except TypeError: + pass + +try: + time.mktime((999999, 999999, 999999, 999999, + 999999, 999999, 999999, 999999, + 999999)) +except OverflowError: + pass |