diff options
Diffstat (limited to 'Lib/test/test_structseq.py')
-rw-r--r-- | Lib/test/test_structseq.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/test/test_structseq.py b/Lib/test/test_structseq.py new file mode 100644 index 0000000..33d3313 --- /dev/null +++ b/Lib/test/test_structseq.py @@ -0,0 +1,16 @@ +from test_support import vereq + +import time + +t = time.gmtime() +astuple = tuple(t) +vereq(len(t), len(astuple)) +vereq(t, astuple) + +# Check that slicing works the same way; at one point, slicing t[i:j] with +# 0 < i < j could produce NULLs in the result. +for i in range(-len(t), len(t)): + for j in range(-len(t), len(t)): + vereq(t[i:j], astuple[i:j]) + +XXX more needed |