

def test_tuple(self):
    t = time.gmtime()
    self.assertIsInstance(t, tuple)
    astuple = tuple(t)
    self.assertEqual(len(t), len(astuple))
    self.assertEqual(t, astuple)
    for i in range((- len(t)), len(t)):
        self.assertEqual(t[i:], astuple[i:])
        for j in range((- len(t)), len(t)):
            self.assertEqual(t[i:j], astuple[i:j])
    for j in range((- len(t)), len(t)):
        self.assertEqual(t[:j], astuple[:j])
    self.assertRaises(IndexError, t.__getitem__, ((- len(t)) - 1))
    self.assertRaises(IndexError, t.__getitem__, len(t))
    for i in range((- len(t)), (len(t) - 1)):
        self.assertEqual(t[i], astuple[i])

dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/test_structseq.py StructSeqTest.test_tuple/original