Skip to content

Commit 28a05a9

Browse files
author
Engelbert Gruber
committed
for python2.1 test_mailgw compareString...
...allows an extra trailing empty line (for quopri.
1 parent 9824b5e commit 28a05a9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/test_mailgw.py

Lines changed: 9 additions & 1 deletion
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.15 2002-03-19 06:37:00 richard Exp $
11+
# $Id: test_mailgw.py,v 1.16 2002-03-19 21:58:11 grubert Exp $
1212

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

@@ -25,6 +25,11 @@ def compareStrings(self, s2, s1):
2525
'''
2626
if s1 == s2:
2727
return
28+
# under python2.1 we allow a difference of one trailing empty line.
29+
if sys.version_info[0:2] == (2,1):
30+
if s1+'\n' == s2:
31+
return
32+
2833
l1=s1.split('\n')
2934
l2=s2.split('\n')
3035
s = difflib.SequenceMatcher(None, l1, l2)
@@ -426,6 +431,9 @@ def suite():
426431

427432
#
428433
# $Log: not supported by cvs2svn $
434+
# Revision 1.15 2002/03/19 06:37:00 richard
435+
# Made the email checking spit out a diff - much easier to spot the problem!
436+
#
429437
# Revision 1.14 2002/03/18 18:32:00 rochecompaan
430438
# All messages sent to the nosy list are now encoded as quoted-printable.
431439
#

0 commit comments

Comments
 (0)