Skip to content

Commit 12b315f

Browse files
author
Johannes Gijsbers
committed
Move tests to test_mailsplit, which I hadn't seen before
(insert the sound of one hand slapping here).
1 parent ae6d371 commit 12b315f

File tree

2 files changed

+11
-21
lines changed

2 files changed

+11
-21
lines changed

test/test_mailgw.py

Lines changed: 2 additions & 20 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.55 2003-10-24 15:01:11 jlgijsbers Exp $
11+
# $Id: test_mailgw.py,v 1.56 2003-10-25 12:02:36 jlgijsbers Exp $
1212

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

@@ -994,26 +994,8 @@ def testRegistrationConfirmation(self):
994994

995995
self.db.user.lookup('johannes')
996996

997-
998-
class ParseContentTestCase(unittest.TestCase):
999-
def testSignatureRemoval(self):
1000-
summary, content = parseContent('''Testing, testing.
1001-
1002-
--
1003-
Signature''', 1, 0)
1004-
self.assertEqual(content, 'Testing, testing.')
1005-
1006-
def testKeepMultipleHyphens(self):
1007-
body = '''Testing, testing.
1008-
1009-
----
1010-
Testing, testing.'''
1011-
summary, content = parseContent(body, 1, 0)
1012-
self.assertEqual(body, content)
1013-
1014997
def suite():
1015-
l = [unittest.makeSuite(MailgwTestCase),
1016-
unittest.makeSuite(ParseContentTestCase)]
998+
l = [unittest.makeSuite(MailgwTestCase)]
1017999
return unittest.TestSuite(l)
10181000

10191001

test/test_mailsplit.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: test_mailsplit.py,v 1.13 2003-09-30 23:55:54 richard Exp $
18+
# $Id: test_mailsplit.py,v 1.14 2003-10-25 12:02:37 jlgijsbers Exp $
1919

2020
import unittest, cStringIO
2121

@@ -219,6 +219,14 @@ def testMultilineSummary(self):
219219
self.assertEqual(summary, 'This is a long sentence that would '
220220
'normally\nbe split.')
221221

222+
def testKeepMultipleHyphens(self):
223+
body = '''Testing, testing.
224+
225+
----
226+
Testing, testing.'''
227+
summary, content = parseContent(body, 1, 0)
228+
self.assertEqual(body, content)
229+
222230
def suite():
223231
return unittest.makeSuite(MailsplitTestCase, 'test')
224232

0 commit comments

Comments
 (0)