[Python-checkins] python/dist/src/Lib/test pickletester.py,1.14,1.15 string_tests.py,1.13,1.14 test_cfgparser.py,1.10,1.11 test_email.py,1.27,1.28 test_longexp.py,1.5,1.6 test_mpz.py,1.2,1.3 test_netrc.py,1.1,1.2 test_robotparser.py,1.1,1.2 test_types.py,1.27,1.28 test_unicode.py,1.54,1.55 test_univnewlines.py,1.1,1.2 test_urlparse.py,1.4,1.5
tim_one@sourceforge.net
tim_one@sourceforge.net
Mon, 15 Apr 2002 18:38:44 -0700
- Previous message: [Python-checkins] python/dist/src/Lib BaseHTTPServer.py,1.20,1.21 asynchat.py,1.17,1.18 fileinput.py,1.10,1.11 gzip.py,1.31,1.32 imaplib.py,1.45,1.46 os2emxpath.py,1.3,1.4 pre.py,1.11,1.12 re.py,1.42,1.43 rlcompleter.py,1.10,1.11 smtplib.py,1.52,1.53 warnings.py,1.11,1.12
- Next message: [Python-checkins] python/dist/src/Lib warnings.py,1.12,1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv29959/python/Lib/test
Modified Files:
pickletester.py string_tests.py test_cfgparser.py
test_email.py test_longexp.py test_mpz.py test_netrc.py
test_robotparser.py test_types.py test_unicode.py
test_univnewlines.py test_urlparse.py
Log Message:
Whitespace normalization.
Index: pickletester.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/pickletester.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** pickletester.py 6 Mar 2002 17:11:18 -0000 1.14
--- pickletester.py 16 Apr 2002 01:38:39 -0000 1.15
***************
*** 254,258 ****
s = self.dumps(t)
u = self.loads(s)
! self.assertEqual(t, u)
import os
if hasattr(os, "stat"):
--- 254,258 ----
s = self.dumps(t)
u = self.loads(s)
! self.assertEqual(t, u)
import os
if hasattr(os, "stat"):
Index: string_tests.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/string_tests.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** string_tests.py 15 Apr 2002 13:36:43 -0000 1.13
--- string_tests.py 16 Apr 2002 01:38:40 -0000 1.14
***************
*** 240,244 ****
test('zfill', '34', '34', 1)
test('zfill', '34', '0034', 4)
!
# Encoding/decoding
codecs = [('rot13', 'uryyb jbeyq'),
--- 240,244 ----
test('zfill', '34', '34', 1)
test('zfill', '34', '0034', 4)
!
# Encoding/decoding
codecs = [('rot13', 'uryyb jbeyq'),
Index: test_cfgparser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_cfgparser.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** test_cfgparser.py 8 Mar 2002 18:10:12 -0000 1.10
--- test_cfgparser.py 16 Apr 2002 01:38:40 -0000 1.11
***************
*** 68,72 ****
likes it.
""")
!
def case_sensitivity():
print "Testing case sensitivity..."
--- 68,72 ----
likes it.
""")
!
def case_sensitivity():
print "Testing case sensitivity..."
Index: test_email.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_email.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** test_email.py 15 Apr 2002 22:11:55 -0000 1.27
--- test_email.py 16 Apr 2002 01:38:40 -0000 1.28
***************
*** 314,318 ****
eq(msg.get_params(),
[('multipart/report', ''),
! ('boundary', 'D1690A7AC1.996856090/mail.example.com')])
msg.set_param("report-type", old_val)
eq(msg.get_params(),
--- 314,318 ----
eq(msg.get_params(),
[('multipart/report', ''),
! ('boundary', 'D1690A7AC1.996856090/mail.example.com')])
msg.set_param("report-type", old_val)
eq(msg.get_params(),
***************
*** 332,336 ****
eq(msg['content-type'], 'text/html; charset="us-ascii"')
!
# Test the email.Encoders module
--- 332,336 ----
eq(msg['content-type'], 'text/html; charset="us-ascii"')
!
# Test the email.Encoders module
***************
*** 410,414 ****
Content-Transfer-Encoding: 7bit
X-Foobar-Spoink-Defrobnit: wasnipoop; giraffes="very-long-necked-animals";
! spooge="yummy"; hippos="gargantuan"; marshmallows="gooey"
''')
--- 410,414 ----
Content-Transfer-Encoding: 7bit
X-Foobar-Spoink-Defrobnit: wasnipoop; giraffes="very-long-necked-animals";
! spooge="yummy"; hippos="gargantuan"; marshmallows="gooey"
''')
***************
*** 451,470 ****
msg['Received'] = """\
from babylon.socal-raves.org (localhost [127.0.0.1]); by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81; for <mailman-admin@babylon.socal-raves.org>; Sat, 2 Feb 2002 17:00:06 -0800 (PST)
! from babylon.socal-raves.org (localhost [127.0.0.1]); by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81; for <mailman-admin@babylon.socal-raves.org>; Sat, 2 Feb 2002 17:00:06 -0800 (PST)
! from babylon.socal-raves.org (localhost [127.0.0.1]); by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81; for <mailman-admin@babylon.socal-raves.org>; Sat, 2 Feb 2002 17:00:06 -0800 (PST)
"""
self.assertEqual(msg.as_string(), """\
Received: from babylon.socal-raves.org (localhost [127.0.0.1]);
! by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81;
! for <mailman-admin@babylon.socal-raves.org>;
! Sat, 2 Feb 2002 17:00:06 -0800 (PST)
! from babylon.socal-raves.org (localhost [127.0.0.1]);
! by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81;
! for <mailman-admin@babylon.socal-raves.org>;
! Sat, 2 Feb 2002 17:00:06 -0800 (PST)
! from babylon.socal-raves.org (localhost [127.0.0.1]);
! by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81;
! for <mailman-admin@babylon.socal-raves.org>;
! Sat, 2 Feb 2002 17:00:06 -0800 (PST)
--- 451,470 ----
msg['Received'] = """\
from babylon.socal-raves.org (localhost [127.0.0.1]); by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81; for <mailman-admin@babylon.socal-raves.org>; Sat, 2 Feb 2002 17:00:06 -0800 (PST)
! from babylon.socal-raves.org (localhost [127.0.0.1]); by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81; for <mailman-admin@babylon.socal-raves.org>; Sat, 2 Feb 2002 17:00:06 -0800 (PST)
! from babylon.socal-raves.org (localhost [127.0.0.1]); by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81; for <mailman-admin@babylon.socal-raves.org>; Sat, 2 Feb 2002 17:00:06 -0800 (PST)
"""
self.assertEqual(msg.as_string(), """\
Received: from babylon.socal-raves.org (localhost [127.0.0.1]);
! by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81;
! for <mailman-admin@babylon.socal-raves.org>;
! Sat, 2 Feb 2002 17:00:06 -0800 (PST)
! from babylon.socal-raves.org (localhost [127.0.0.1]);
! by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81;
! for <mailman-admin@babylon.socal-raves.org>;
! Sat, 2 Feb 2002 17:00:06 -0800 (PST)
! from babylon.socal-raves.org (localhost [127.0.0.1]);
! by babylon.socal-raves.org (Postfix) with ESMTP id B570E51B81;
! for <mailman-admin@babylon.socal-raves.org>;
! Sat, 2 Feb 2002 17:00:06 -0800 (PST)
***************
*** 722,726 ****
--BOUNDARY--
! ''')
def test_one_part_in_a_multipart(self):
--- 722,726 ----
--BOUNDARY--
! ''')
def test_one_part_in_a_multipart(self):
***************
*** 749,753 ****
--BOUNDARY--
! ''')
def test_seq_parts_in_a_multipart(self):
--- 749,753 ----
--BOUNDARY--
! ''')
def test_seq_parts_in_a_multipart(self):
***************
*** 776,780 ****
--BOUNDARY--
! ''')
--- 776,780 ----
--BOUNDARY--
! ''')
***************
*** 1164,1172 ****
all = module.__all__
all.sort()
! self.assertEqual(all, ['Charset', 'Encoders', 'Errors', 'Generator',
! 'Header', 'Iterators', 'MIMEAudio',
! 'MIMEBase', 'MIMEImage', 'MIMEMessage',
'MIMEText', 'Message', 'Parser',
! 'Utils', 'base64MIME',
'message_from_file', 'message_from_string',
'quopriMIME'])
--- 1164,1172 ----
all = module.__all__
all.sort()
! self.assertEqual(all, ['Charset', 'Encoders', 'Errors', 'Generator',
! 'Header', 'Iterators', 'MIMEAudio',
! 'MIMEBase', 'MIMEImage', 'MIMEMessage',
'MIMEText', 'Message', 'Parser',
! 'Utils', 'base64MIME',
'message_from_file', 'message_from_string',
'quopriMIME'])
***************
*** 1314,1318 ****
To: bperson@dom.ain
Subject: the next line has a space on it
!
Date: Mon, 8 Apr 2002 15:09:19 -0400
Message-ID: spam
--- 1314,1318 ----
To: bperson@dom.ain
Subject: the next line has a space on it
!
Date: Mon, 8 Apr 2002 15:09:19 -0400
Message-ID: spam
***************
*** 1368,1372 ****
eHh4eCB4eHh4IA==\r
""")
!
def test_header_encode(self):
eq = self.assertEqual
--- 1368,1372 ----
eHh4eCB4eHh4IA==\r
""")
!
def test_header_encode(self):
eq = self.assertEqual
***************
*** 1505,1509 ****
two line""")
!
--- 1505,1509 ----
two line""")
!
Index: test_longexp.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_longexp.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_longexp.py 15 Mar 2002 13:50:54 -0000 1.5
--- test_longexp.py 16 Apr 2002 01:38:40 -0000 1.6
***************
*** 7,13 ****
if sys.platform == 'mac':
! import gestalt
! if gestalt.gestalt('sysv') > 0x9ff:
! raise TestSkipped, 'Triggers pathological malloc slowdown on OSX MacPython'
if sys.platform == "os2emx":
raise TestFailed, "OS/2+EMX port has malloc problems with long expressions"
--- 7,13 ----
if sys.platform == 'mac':
! import gestalt
! if gestalt.gestalt('sysv') > 0x9ff:
! raise TestSkipped, 'Triggers pathological malloc slowdown on OSX MacPython'
if sys.platform == "os2emx":
raise TestFailed, "OS/2+EMX port has malloc problems with long expressions"
Index: test_mpz.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_mpz.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_mpz.py 1 Apr 2002 18:59:20 -0000 1.2
--- test_mpz.py 16 Apr 2002 01:38:40 -0000 1.3
***************
*** 88,90 ****
except ValueError: pass
else: raise TestFailed, 'mpz(-10).binary() should raise a ValueError'
-
--- 88,89 ----
Index: test_netrc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_netrc.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_netrc.py 22 Mar 2002 02:48:57 -0000 1.1
--- test_netrc.py 16 Apr 2002 01:38:40 -0000 1.2
***************
*** 13,17 ****
line4
! default login log2 password pass2
"""
--- 13,17 ----
line4
! default login log2 password pass2
"""
***************
*** 26,30 ****
fp.close()
self.netrc = netrc.netrc(temp_filename)
!
def tearDown (self):
del self.netrc
--- 26,30 ----
fp.close()
self.netrc = netrc.netrc(temp_filename)
!
def tearDown (self):
del self.netrc
***************
*** 37,43 ****
self.assert_(self.netrc.hosts['foo'] == ('log1', 'acct1', 'pass1'))
self.assert_(self.netrc.hosts['default'] == ('log2', None, 'pass2'))
!
!
if __name__ == "__main__":
test_support.run_unittest(NetrcTestCase)
-
--- 37,42 ----
self.assert_(self.netrc.hosts['foo'] == ('log1', 'acct1', 'pass1'))
self.assert_(self.netrc.hosts['default'] == ('log2', None, 'pass2'))
!
!
if __name__ == "__main__":
test_support.run_unittest(NetrcTestCase)
Index: test_robotparser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_robotparser.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_robotparser.py 28 Feb 2002 15:24:47 -0000 1.1
--- test_robotparser.py 16 Apr 2002 01:38:40 -0000 1.2
***************
*** 31,42 ****
def RobotTest(index, robots_txt, good_urls, bad_urls,
agent="test_robotparser"):
!
! lines = StringIO.StringIO(robots_txt).readlines()
! parser = robotparser.RobotFileParser()
! parser.parse(lines)
! for url in good_urls:
! tests.addTest(RobotTestCase(index, parser, url, 1, agent))
! for url in bad_urls:
! tests.addTest(RobotTestCase(index, parser, url, 0, agent))
# Examples from http://www.robotstxt.org/wc/norobots.html (fetched 2002)
--- 31,42 ----
def RobotTest(index, robots_txt, good_urls, bad_urls,
agent="test_robotparser"):
!
! lines = StringIO.StringIO(robots_txt).readlines()
! parser = robotparser.RobotFileParser()
! parser.parse(lines)
! for url in good_urls:
! tests.addTest(RobotTestCase(index, parser, url, 1, agent))
! for url in bad_urls:
! tests.addTest(RobotTestCase(index, parser, url, 0, agent))
# Examples from http://www.robotstxt.org/wc/norobots.html (fetched 2002)
***************
*** 117,121 ****
bad = ['/tmp/','/tmp/a.html',
'/a%3cd.html','/a%3Cd.html',"/a/b.html",
! '/%7Ejoe/index.html']
RobotTest(6, doc, good, bad)
--- 117,121 ----
bad = ['/tmp/','/tmp/a.html',
'/a%3cd.html','/a%3Cd.html',"/a/b.html",
! '/%7Ejoe/index.html']
RobotTest(6, doc, good, bad)
Index: test_types.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_types.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** test_types.py 12 Apr 2002 15:11:59 -0000 1.27
--- test_types.py 16 Apr 2002 01:38:40 -0000 1.28
***************
*** 495,499 ****
try:
for i in d:
! d[i+1] = 1
except RuntimeError:
pass
--- 495,499 ----
try:
for i in d:
! d[i+1] = 1
except RuntimeError:
pass
Index: test_unicode.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode.py,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** test_unicode.py 15 Apr 2002 13:36:44 -0000 1.54
--- test_unicode.py 16 Apr 2002 01:38:40 -0000 1.55
***************
*** 524,528 ****
u'\u3001\u3042\u3068\u306f\u3067\u305f\u3089\u3081\u3067'
u'\u3059\u3002\u5b9f\u969b\u306b\u306f\u300cWenn ist das'
! u' Nunstuck git und'.encode('utf-8') ==
'\xe6\xad\xa3\xe7\xa2\xba\xe3\x81\xab\xe8\xa8\x80\xe3\x81'
'\x86\xe3\x81\xa8\xe7\xbf\xbb\xe8\xa8\xb3\xe3\x81\xaf\xe3'
--- 524,528 ----
u'\u3001\u3042\u3068\u306f\u3067\u305f\u3089\u3081\u3067'
u'\u3059\u3002\u5b9f\u969b\u306b\u306f\u300cWenn ist das'
! u' Nunstuck git und'.encode('utf-8') ==
'\xe6\xad\xa3\xe7\xa2\xba\xe3\x81\xab\xe8\xa8\x80\xe3\x81'
'\x86\xe3\x81\xa8\xe7\xbf\xbb\xe8\xa8\xb3\xe3\x81\xaf\xe3'
Index: test_univnewlines.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_univnewlines.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_univnewlines.py 14 Apr 2002 20:17:18 -0000 1.1
--- test_univnewlines.py 16 Apr 2002 01:38:40 -0000 1.2
***************
*** 6,14 ****
DATA_TEMPLATE=[
! "line1=1",
! "line2='this is a very long line designed to go past the magic " +
! "hundred character limit that is inside fileobject.c and which " +
! "is meant to speed up the common case, but we also want to test " +
! "the uncommon case, naturally.'",
"def line3():pass"
]
--- 6,14 ----
DATA_TEMPLATE=[
! "line1=1",
! "line2='this is a very long line designed to go past the magic " +
! "hundred character limit that is inside fileobject.c and which " +
! "is meant to speed up the common case, but we also want to test " +
! "the uncommon case, naturally.'",
"def line3():pass"
]
***************
*** 41,45 ****
except:
pass
!
def test_read(self):
fp = open(test_support.TESTFN, self.READMODE)
--- 41,45 ----
except:
pass
!
def test_read(self):
fp = open(test_support.TESTFN, self.READMODE)
***************
*** 47,51 ****
self.assertEqual(data, DATA_LF)
self.assertEqual(`fp.newlines`, `self.NEWLINE`)
!
def test_readlines(self):
fp = open(test_support.TESTFN, self.READMODE)
--- 47,51 ----
self.assertEqual(data, DATA_LF)
self.assertEqual(`fp.newlines`, `self.NEWLINE`)
!
def test_readlines(self):
fp = open(test_support.TESTFN, self.READMODE)
***************
*** 63,67 ****
self.assertEqual(data, DATA_SPLIT)
self.assertEqual(`fp.newlines`, `self.NEWLINE`)
!
def test_seek(self):
fp = open(test_support.TESTFN, self.READMODE)
--- 63,67 ----
self.assertEqual(data, DATA_SPLIT)
self.assertEqual(`fp.newlines`, `self.NEWLINE`)
!
def test_seek(self):
fp = open(test_support.TESTFN, self.READMODE)
***************
*** 73,77 ****
data = fp.readlines()
self.assertEqual(data, DATA_SPLIT[1:])
!
def test_execfile(self):
dict = {}
--- 73,77 ----
data = fp.readlines()
self.assertEqual(data, DATA_SPLIT[1:])
!
def test_execfile(self):
dict = {}
***************
*** 79,83 ****
func = dict['line3']
self.assertEqual(func.func_code.co_firstlineno, 3)
!
class TestNativeNewlines(TestGenericUnivNewlines):
--- 79,83 ----
func = dict['line3']
self.assertEqual(func.func_code.co_firstlineno, 3)
!
class TestNativeNewlines(TestGenericUnivNewlines):
***************
*** 86,106 ****
READMODE='r'
WRITEMODE='w'
!
class TestCRNewlines(TestGenericUnivNewlines):
NEWLINE='\r'
DATA=DATA_CR
!
class TestLFNewlines(TestGenericUnivNewlines):
NEWLINE='\n'
DATA=DATA_LF
!
class TestCRLFNewlines(TestGenericUnivNewlines):
NEWLINE='\r\n'
DATA=DATA_CRLF
!
class TestMixedNewlines(TestGenericUnivNewlines):
NEWLINE=('\r', '\n')
DATA=DATA_MIXED
!
def test_main():
--- 86,106 ----
READMODE='r'
WRITEMODE='w'
!
class TestCRNewlines(TestGenericUnivNewlines):
NEWLINE='\r'
DATA=DATA_CR
!
class TestLFNewlines(TestGenericUnivNewlines):
NEWLINE='\n'
DATA=DATA_LF
!
class TestCRLFNewlines(TestGenericUnivNewlines):
NEWLINE='\r\n'
DATA=DATA_CRLF
!
class TestMixedNewlines(TestGenericUnivNewlines):
NEWLINE=('\r', '\n')
DATA=DATA_MIXED
!
def test_main():
Index: test_urlparse.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_urlparse.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** test_urlparse.py 23 Mar 2002 05:32:10 -0000 1.4
--- test_urlparse.py 16 Apr 2002 01:38:40 -0000 1.5
***************
*** 124,126 ****
if __name__ == "__main__":
test_main()
-
--- 124,125 ----
- Previous message: [Python-checkins] python/dist/src/Lib BaseHTTPServer.py,1.20,1.21 asynchat.py,1.17,1.18 fileinput.py,1.10,1.11 gzip.py,1.31,1.32 imaplib.py,1.45,1.46 os2emxpath.py,1.3,1.4 pre.py,1.11,1.12 re.py,1.42,1.43 rlcompleter.py,1.10,1.11 smtplib.py,1.52,1.53 warnings.py,1.11,1.12
- Next message: [Python-checkins] python/dist/src/Lib warnings.py,1.12,1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]