Sha256: c834e94bc6aaaf22ef340c43f0de49d1259c97d4d2a5a0075b34d644ee33f41f

Contents?: true

Size: 587 Bytes

Versions: 30

Compression:

Stored size: 587 Bytes

Contents

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])

# Devious code could crash structseqs' contructors
class C:
    def __getitem__(self, i):
        raise IndexError
    def __len__(self):
        return 9

try:
    repr(time.struct_time(C()))
except:
    pass

# XXX more needed

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
rubyfox-server-2.19.2.0 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py
rubyfox-server-2.17.3.2 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py
rubyfox-server-2.17.3.1 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py
rubyfox-server-2.17.3.0 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py
rubyfox-server-2.16.3.2 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py
rubyfox-server-2.16.3.1 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py
rubyfox-server-2.16.0.4 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py
rubyfox-server-2.16.0.3 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py
rubyfox-server-2.16.0.2 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py
rubyfox-server-2.16.0.1 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py
rubyfox-server-2.16.0.0 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py
rubyfox-server-2.13.7.3 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py
rubyfox-server-2.13.6.2 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py
rubyfox-server-2.13.6.1 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py
rubyfox-server-2.13.5.1 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py
rubyfox-server-2.13.4.1 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py
rubyfox-server-2.13.3.1 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py
rubyfox-server-2.12.5.1 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py
rubyfox-server-2.12.5.0 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py
rubyfox-server-2.12.4.0 lib/rubyfox/server/data/lib/Lib/test/test_structseq.py