'Compares recorded lines to expected warnings.'

def _ExpectedWarnings(self, expected):

    self.stderr.seek(0)
    actual = self.stderr.read().split('\n')
    actual = [line for line in actual if line]
    self.assertEqual(sorted(expected), sorted(actual))
