def testUnsortedSliceComplex(self):
        session = self.session()
        qs = session.query(self.model)
        N = yield qs.count()
        self.assertTrue(N)
        q1 = yield qs[0:-1]
        self.assertEqual(len(q1), N-1)
        for id, q in enumerate(q1,1):
            self.assertEqual(q.id, id)
        q1 = yield qs[2:4]
        self.assertEqual(len(q1), 2)
        self.assertEqual(q1[0].id, 3)
        self.assertEqual(q1[1].id, 4)
dataset/ETHPy150Open lsbardel/python-stdnet/tests/all/query/slice.py/TestFilter.testUnsortedSliceComplex/original