Skip to content

Commit d297ddb

Browse files
author
Johannes Gijsbers
committed
Simplify Message comparison.
1 parent 98d9e99 commit d297ddb

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

test/test_mailgw.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# but WITHOUT ANY WARRANTY; without even the implied warranty of
99
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1010
#
11-
# $Id: test_mailgw.py,v 1.49 2003-09-07 13:08:08 jlgijsbers Exp $
11+
# $Id: test_mailgw.py,v 1.50 2003-09-07 18:27:47 jlgijsbers Exp $
1212

1313
import unittest, tempfile, os, shutil, errno, imp, sys, difflib, rfc822
1414

@@ -25,13 +25,7 @@ def __init__(self, s):
2525
def __eq__(self, other):
2626
del self['date'], other['date']
2727

28-
self.headers.sort()
29-
other.headers.sort()
30-
31-
self.rewindbody()
32-
other.rewindbody()
33-
34-
return (self.headers == other.headers and
28+
return (self.dict == other.dict and
3529
self.fp.read() == other.fp.read())
3630

3731
# TODO: Do a semantic diff instead of a straight text diff when a test fails.

0 commit comments

Comments
 (0)