def test_max_emails(self):
        
        messages = []

        with self.mail.record_messages() as outbox:
            with self.mail.connect(max_emails=10) as conn:
                for i in xrange(100):
                    msg = Message(subject="testing",
                                  recipients=["to@example.com"],
                                  body="testing")
        
                    conn.send(msg)

                    print conn.num_emails
                    if 10 % i == 0:
                        assert conn.num_emails == 1

            assert len(outbox) == 100
dataset/ETHPy150Open danjac/Flask-Mail/tests.py/TestConnection.test_max_emails/swapped operands of `%`