def check(self, msg, results):
        """Check addresses and the date."""
        m = self.create_message(msg)
        i = 0
        for n, a in m.getaddrlist('to') + m.getaddrlist('cc'):
            try:
                mn, ma = results[i][0], results[i][1]
            except IndexError:
                print 'extra parsed address:', repr(n), repr(a)
                continue
            i = i + 1
            self.assertEqual(mn, n,
                             "Un-expected name: %s != %s" % (`mn`, `n`))
            self.assertEqual(ma, a,
                             "Un-expected address: %s != %s" % (`ma`, `a`))
            if mn == n and ma == a:
                pass
            else:
                print 'not found:', repr(n), repr(a)

        out = m.getdate('date')
        if out:
            self.assertEqual(out,
                             (1999, 1, 13, 23, 57, 35, 0, 1, 0),
                             "date conversion failed")


    # Note: all test cases must have the same date (in various formats),
    # or no date!
dataset/ETHPy150Open babble/babble/include/jython/Lib/test/test_rfc822.py/MessageTestCase.check/original