diff options
author | R David Murray <rdmurray@bitdance.com> | 2011-03-31 17:11:40 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2011-03-31 17:11:40 (GMT) |
commit | a46ed1186f1d24ff56aa3a07d106246f73ab4509 (patch) | |
tree | 474e82b1dd740a2264e5995ee3df71541065ff92 /Lib/test/test_email/test_email.py | |
parent | eb50e51a0fd6e182a7543eddfe039226b1a80262 (diff) | |
download | cpython-a46ed1186f1d24ff56aa3a07d106246f73ab4509.zip cpython-a46ed1186f1d24ff56aa3a07d106246f73ab4509.tar.gz cpython-a46ed1186f1d24ff56aa3a07d106246f73ab4509.tar.bz2 |
Move assertBytesEqual to base test class, improve it, and hook into assertEqual
Diffstat (limited to 'Lib/test/test_email/test_email.py')
-rw-r--r-- | Lib/test/test_email/test_email.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py index 2519cc0..3d86b6a 100644 --- a/Lib/test/test_email/test_email.py +++ b/Lib/test/test_email/test_email.py @@ -3161,12 +3161,7 @@ class BaseTestBytesGeneratorIdempotent: b = BytesIO() g = email.generator.BytesGenerator(b, maxheaderlen=0) g.flatten(msg, unixfrom=unixfrom, linesep=self.linesep) - self.assertByteStringsEqual(data, b.getvalue()) - - def assertByteStringsEqual(self, str1, str2): - # Not using self.blinesep here is intentional. This way the output - # is more useful when the failure results in mixed line endings. - self.assertListEqual(str1.split(b'\n'), str2.split(b'\n')) + self.assertEqual(data, b.getvalue()) class TestBytesGeneratorIdempotentNL(BaseTestBytesGeneratorIdempotent, |