def test_TOPWithBadArgument(self):
        """
        Test that trying to download a message with a bad argument, either a
        message number which isn't an integer or is an out-of-bounds integer or
        a number of lines which isn't an integer or is a negative integer,
        fails with the appropriate error response.
        """
        p = self.pop3Server
        s = self.pop3Transport
        p.mbox.messages.append(self.extraMessage)

        p.lineReceived(b"TOP 1 a")
        self.assertEqual(
            s.getvalue(),
            b"-ERR Bad line count argument\r\n")
        s.seek(0)
        s.truncate(0)

        p.lineReceived(b"TOP 1 -1")
        self.assertEqual(
            s.getvalue(),
            b"-ERR Bad line count argument\r\n")
        s.seek(0)
        s.truncate(0)

        p.lineReceived(b"TOP a 1")
        self.assertEqual(
            s.getvalue(),
            b"-ERR Bad message number argument\r\n")
        s.seek(0)
        s.truncate(0)

        p.lineReceived(b"TOP 0 1")
        self.assertEqual(
            s.getvalue(),
            b"-ERR Bad message number argument\r\n")
        s.seek(0)
        s.truncate(0)

        p.lineReceived(b"TOP 3 1")
        self.assertEqual(
            s.getvalue(),
            b"-ERR Bad message number argument\r\n")
        s.seek(0)
        s.truncate(0)

        Test that trying to download a message with a bad argument, either a
        message number which isn't an integer or is an out-of-bounds integer or
        a number of lines which isn't an integer or is a negative integer,
        fails with the appropriate error response.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_pop3.py