'#23555 -- Unexpected IndexError exceptions in QuerySet iteration
shouldn\'t be suppressed.'

def test_index_error_not_suppressed(self):

    def check():
        with self.assertRaises(IndexError):
            IndexErrorArticle.objects.all()[:10:2]
        with self.assertRaises(IndexError):
            IndexErrorArticle.objects.all().first()
        with self.assertRaises(IndexError):
            IndexErrorArticle.objects.all().last()
    check()
    IndexErrorArticle.objects.create(headline='Article    1', pub_date=datetime(2005, 7, 26), expire_date=datetime(2005, 9, 1))
    check()
