def test_setLastWithWildcardRange(self):
        """
        Setting L{MessageSet.last} replaces L{None} in all ranges.
        """
        m = MessageSet(1, None)
        m.add(2, None)
        m.last = 5
        self.assertEqual(list(m), [1, 2, 3, 4, 5])

        Setting L{MessageSet.last} replaces L{None} in all ranges.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py