Skip to content

Commit db9756d

Browse files
author
Richard Jones
committed
removed some print statements
1 parent a2adbf5 commit db9756d

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

roundup/mailgw.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class node. Any parts of other types are each stored in separate files
5555
an exception, the original message is bounced back to the sender with the
5656
explanatory message given in the exception.
5757
58-
$Id: mailgw.py,v 1.7 2001-08-03 07:18:22 richard Exp $
58+
$Id: mailgw.py,v 1.8 2001-08-05 07:06:07 richard Exp $
5959
'''
6060

6161

@@ -297,7 +297,6 @@ def parseContent(content, blank_line=re.compile(r'[\r\n]+\s*[\r\n]+'),
297297
# extract out the summary from the message
298298
summary = ''
299299
l = []
300-
print sections
301300
for section in sections:
302301
section = section.strip()
303302
if not section:
@@ -318,6 +317,10 @@ def parseContent(content, blank_line=re.compile(r'[\r\n]+\s*[\r\n]+'),
318317

319318
#
320319
# $Log: not supported by cvs2svn $
320+
# Revision 1.7 2001/08/03 07:18:22 richard
321+
# Implemented correct mail splitting (was taking a shortcut). Added unit
322+
# tests. Also snips signatures now too.
323+
#
321324
# Revision 1.6 2001/08/01 04:24:21 richard
322325
# mailgw was assuming certain properties existed on the issues being created.
323326
#

test/test_mailsplit.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: test_mailsplit.py,v 1.2 2001-08-03 07:23:09 richard Exp $
1+
# $Id: test_mailsplit.py,v 1.3 2001-08-05 07:06:25 richard Exp $
22

33
import unittest, cStringIO
44

@@ -28,9 +28,8 @@ def testPreComment(self):
2828
2929
'''
3030
summary, content = parseContent(s)
31-
print '\n====\n', summary
32-
print '====', content
33-
print '===='
31+
self.assertEqual(summary, 'blah blah blah blah... blah blah? blah blah blah blah blah. blah blah blah')
32+
self.assertEqual(content, 'blah blah blah blah... blah blah? blah blah blah blah blah. blah blah blah\nblah blah blah blah blah blah blah blah blah blah blah!')
3433

3534
def testPostComment(self):
3635
s = '''
@@ -58,30 +57,30 @@ def testPostComment(self):
5857
5958
'''
6059
summary, content = parseContent(s)
61-
print '\n====\n', summary
62-
print '====', content
63-
print '===='
60+
self.assertEqual(summary, 'blah blah blah blah... blah blah? blah blah blah blah blah. blah blah blah')
61+
self.assertEqual(content, 'blah blah blah blah... blah blah? blah blah blah blah blah. blah blah blah\nblah blah blah blah blah blah blah blah blah blah blah!')
6462

6563
def testSimple(self):
6664
s = '''testing'''
6765
summary, content = parseContent(s)
68-
print '\n====\n', summary
69-
print '====', content
70-
print '===='
66+
self.assertEqual(summary, 'testing')
67+
self.assertEqual(content, 'testing')
7168

7269
def testEmpty(self):
7370
s = ''
7471
summary, content = parseContent(s)
75-
print '\n====\n', summary
76-
print '====', content
77-
print '===='
72+
self.assertEqual(summary, '')
73+
self.assertEqual(content, '')
7874

7975
def suite():
8076
return unittest.makeSuite(MailsplitTestCase, 'test')
8177

8278

8379
#
8480
# $Log: not supported by cvs2svn $
81+
# Revision 1.2 2001/08/03 07:23:09 richard
82+
# er, removed the innocent from the the code :)
83+
#
8584
# Revision 1.1 2001/08/03 07:18:22 richard
8685
# Implemented correct mail splitting (was taking a shortcut). Added unit
8786
# tests. Also snips signatures now too.

0 commit comments

Comments
 (0)