summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_email/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_email/__init__.py')
-rw-r--r--Lib/test/test_email/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_email/__init__.py b/Lib/test/test_email/__init__.py
index b05fb3c..75dc64d 100644
--- a/Lib/test/test_email/__init__.py
+++ b/Lib/test/test_email/__init__.py
@@ -65,3 +65,9 @@ class TestEmailBase(unittest.TestCase):
def assertBytesEqual(self, first, second, msg):
"""Our byte strings are really encoded strings; improve diff output"""
self.assertEqual(self._bytes_repr(first), self._bytes_repr(second))
+
+ def assertDefectsEqual(self, actual, expected):
+ self.assertEqual(len(actual), len(expected), actual)
+ for i in range(len(actual)):
+ self.assertIsInstance(actual[i], expected[i],
+ 'item {}'.format(i))