def test_setLastTwiceFails(self):
        """
        L{MessageSet.last} cannot be set twice.
        """
        m = MessageSet(1, None)
        m.last = 2
        with self.assertRaises(ValueError):
            m.last = 3

        L{MessageSet.last} cannot be set twice.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py