summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* Backporting urlparse.py:1.34, test_urlparse.py:1.8:Guido van Rossum2002-10-141-0/+5
| | | | | Fix for 1.33: urlsplit() should only add '//' if scheme != ''. [SF bug 620705]
* Use \n as line separator in stead of \r\n, which causes problems in ↵Jack Jansen2002-10-102-10/+10
| | | | MacPython 2.2.
* Backport of 1.7:Jack Jansen2002-10-101-4/+4
| | | | | Reorganized so the test is skipped if os.popen() doesn't exist (in stead of fail ing).
* TheTim Peters2002-10-081-1/+1
| | | | | | | | | | | | | | list(xrange(sys.maxint / 4)) test. Changed 4 to 2. The belief is that this test intended to trigger a bit of code in listobject.c's NRESIZE macro that's looking for arithmetic overflow. As written, it doesn't achieve that, though, and leaves it up to the platform realloc() as to whether it wants to allocate 2 gigabytes. Some platforms say "sure!", although they don't appear to mean it, and disaster ensues. Changing 4 to 2 (just barely) manages to trigger the arithmetic overflow test instead, leaving the platform realloc() out of it.
* Fix some code that was added to the r22-maint branch to allow it to work withFred Drake2002-10-082-1/+68
| | | | | | arbitrary versions of Expat. Not applicable to Python 2.3, which will incorporate an Expat that does not need this crutch.
* Backport, at the reqest of Kevin Jacobs:Guido van Rossum2002-10-071-0/+22
| | | | | | | | | | | - Changed new-style class instantiation so that when C's __new__ method returns something that's not a C instance, its __init__ is not called. [SF bug #537450] XXX This is arguably a semantic change, but it's hard to imagine a reason for wanting to depend on the old behavior. If problems with this are reported within a week of the release of 2.2.2 beta 1, we may revert this change.
* Backport:Michael W. Hudson2002-10-071-0/+16
| | | | | | | | | | | | | | 2002/08/11 12:23:04 lemburg Python/bltinmodule.c 2.262 2002/08/11 12:23:04 lemburg Objects/unicodeobject.c 2.162 2002/08/11 12:23:03 lemburg Misc/NEWS 1.461 2002/08/11 12:23:03 lemburg Lib/test/test_unicode.py 1.65 2002/08/11 12:23:03 lemburg Include/unicodeobject.h 2.39 Add C API PyUnicode_FromOrdinal() which exposes unichr() at C level. u'%c' will now raise a ValueError in case the argument is an integer outside the valid range of Unicode code point ordinals. Closes SF bug #593581.
* This has no hope of working under -O. Skip it then instead of failing.Tim Peters2002-10-071-0/+3
|
* Whitespace normalization.Tim Peters2002-10-0710-24/+22
|
* Aargh! The 2.3 version of this file requires "from test.test_supportGuido van Rossum2002-10-061-1/+1
| | | | | import run_suite", but the 2.2.2 version requires "from test_support import run_suite" ... :-(
* Backport:Guido van Rossum2002-10-061-2/+4
| | | | | Make sure the email test suite can be run both stand-alone and under supervision of regrtest.py.
* Backporting of email 2.4 from Python 2.3. Many newly added modules,Barry Warsaw2002-10-042-1124/+11
| | | | | | | | some updated modules, updated documentation, and updated tests. Note that Lib/test/regrtest.py added test_email_codecs to the expected skips for all platforms. Also note that test_email_codecs.py differs slightly from its Python 2.3 counterpart due to the difference in package location for TestSkipped.
* Fix for the recursion_level bug Armin Rigo reported in sfMichael W. Hudson2002-10-021-0/+216
| | | | | | | patch #617312, both on the trunk and the 22-maint branch. Also added a test case, and ported the test_trace I wrote for HEAD to 2.2.2 (with all those horrible extra 'line' events ;-).
* Patch #615069: Fix build problems on SCO Open Server 5.Martin v. Löwis2002-09-301-1/+58
|
* Allow internal whitespace in keys.Fred Drake2002-09-271-0/+6
| | | | Closes SF bug #583248.
* has_option(): Use the option name transform consistently.Fred Drake2002-09-261-0/+5
| | | | Closes SF bug #561822.
* Remove unused output file.Fred Drake2002-09-261-217/+0
|
* Backport patches for versions 1.33, 1.35, and 1.36 from the trunk:Fred Drake2002-09-261-25/+24
| | | | | | | | | | | | | revision 1.36: If PyXML is installed, there is no Node.allnodes, so that portion of the test should be skipped if that's the case. revision 1.35: Remove duplicate checks of the Node.allnodes variable. revision 1.33: Follow PyXML: Remove all prints from successful tests. This means we can also drop the output file.
* Fix for PyXML bug #563399, as much as we can implement without relying onFred Drake2002-09-261-1/+1
| | | | | a specific Expat version. This includes fixing a test that enforced the incorrect result.
* Backport:Neal Norwitz2002-09-252-0/+6
| | | | | | Fix SF # 591713, Fix "file:" URL to have right no. of /'s, by Bruce Atherton Add a test too. urljoin() would make file:/tmp/foo instead of file:///tmp/foo
* Replaced this with the 2.3 test_mmap, which contains Windows-specificTim Peters2002-09-241-7/+18
| | | | | | | | fixes for the "try to resize it" test (Windows grows the underlying file then, and that screws up later tests that assume the underlying file has not changed size, as was true on the box (Linux) the person who changed this test in 2.2 to begin with tried it on). Without this change, test_mmap fails on Windows. Now it passes again.
* Regenerate test_unicodedata output after the change to the UTF-8 codec.Marc-André Lemburg2002-09-241-1/+1
|
* Backport the UTF-8 codec from 2.3 and add a work-around to let theMarc-André Lemburg2002-09-241-12/+33
| | | | | | | | UTF-8 decoder accept broken UTF-8 sequences which encode lone high surrogates (the pre-2.2.2 versions forgot to generate the UTF-8 prefix \xed for these). Fixes SF bug #610783: Lone surrogates cause bad .pyc files.
* backport theller's checkin ofMichael W. Hudson2002-09-241-0/+3
| | | | | | | | | | | | revision 1.3 of test_marshal.py Fix SF 588452: debug build crashes on marshal.dumps([128] * 1000). See there for a description. Added test case. Bugfix candidate for 2.2.x, not sure about previous versions: probably low priority, because virtually no one runs debug builds.
* Finish up the random fixes that Raymond started yesterday.Michael W. Hudson2002-09-241-1/+1
|
* Backport 1.51 and 1.54 from trunk.Guido van Rossum2002-09-231-10/+21
| | | | | | | | | | | | | | | | | | 1.51: Bug #556025: list(xrange(1e9)) --> seg fault Close the bug report again -- this time for Cygwin due to a newlib bug. See the following for the details: http://sources.redhat.com/ml/newlib/2002/msg00369.html Note that this commit is only a documentation (i.e., comment) change. 1.54: The list(xrange(sys.maxint / 4)) test blew up on 64-bit platforms. Because ob_size is a 32-bit int but sys.maxint is LONG_MAX which is a 64-bit value, there's no way to make this test succeed on a 64-bit platform. So just skip it when sys.maxint isn't 0x7fffffff.
* Backport 1.56 and 1.68 from trunk:Guido van Rossum2002-09-231-0/+21
| | | | | | | | | | | | | | | | | | | | 1.56: Apply diff3.txt from SF patch http://www.python.org/sf/536241 If a str or unicode method returns the original object, make sure that for str and unicode subclasses the original will not be returned. This should prevent SF bug http://www.python.org/sf/460020 from reappearing. 1.68: Fix SF bug 599128, submitted by Inyeol Lee: .replace() would do the wrong thing for a unicode subclass when there were zero string replacements. The example given in the SF bug report was only one way to trigger this; replacing a string of length >= 2 that's not found is another. The code would actually write outside allocated memory if replacement string was longer than the search string.
* Backport 1.96 from trunk (because I want Xenofarm to test 2.2.2):Guido van Rossum2002-09-231-0/+7
| | | | | Add a bunch of sys.stdout.flush() calls that will hopefully improve the usability of the output of the Xenofarm builds.
* backport bwarsaw's checkin ofMichael W. Hudson2002-09-231-0/+9
| | | | | | | revision 1.17 of test_rfc822.py parseaddr(): Fixed in the same way that Message.getaddrlist() was fixed (re: SF bug #555035). Include a unittest.
* This commit was manufactured by cvs2svn to create branchcvs2svn2002-09-221-0/+66
| | | | 'release22-maint'.
* Try to get test to pass on WindowsNeal Norwitz2002-09-071-1/+2
|
* Backport of SF bug # 585792, Invalid mmap crashes Python interpreterNeal Norwitz2002-09-052-0/+17
| | | | | | | | Raise ValueError if user passes a size to mmap which is larger than the file. Also need Tim's fix in test_mmap.py, 1.22 which flushes the file before mmap'ing it.
* backport gvanrossum's checkin ofMichael W. Hudson2002-08-231-0/+11
| | | | | | | | | | | revision 1.19 of test_weakref.py SF patch 564549 (Erik Andersén). The WeakKeyDictionary constructor didn't work when a dict arg was given. Fixed by moving a line. Also adding a unit test. Bugfix candidate.
* backport montanaro's checkin ofMichael W. Hudson2002-08-231-1/+5
| | | | | | | revision 1.9 of test_gzip.py force gzip module to open files using 'b'inary mode. closes patch #536278.
* backport gvanrossum's checkin ofMichael W. Hudson2002-08-231-1/+1
| | | | | | revision 1.22 of test_fcntl.py SF 554663. Add OpenBSD3. Bugfix candidate if anyone cares.
* backport tim_one's checkin ofMichael W. Hudson2002-08-231-0/+2
| | | | | | | | | | | revision 1.21 of test_mmap.py SF bug 544733: Cygwin test_mmap fix for Python 2.2.1 Close a file before trying to unlink it, and apparently Cygwin needs writes to an mmap'ed file to get flushed before they're visible. Bugfix candidate, but I think only for the 2.2 line (it's testing features that I think were new in 2.2).
* Fix some endcase bugs in unicode rfind()/rindex() and endswith().Guido van Rossum2002-08-201-0/+6
| | | | | | These were reported and fixed by Inyeol Lee in SF bug 595350. The endswith() bug is already fixed in 2.3; I'll fix the others in 2.3 next.
* A trip down memory lane. Barry checked in this test with 2.3-styleTim Peters2002-08-192-9/+1
| | | | | | | | | | | | | | imports of test_support. That causes multiple copies of test_support to get loaded, and the one used by test_base64.py didn't see the proper value of verbose=False, so spewed output. That in turn apparenly caused Barry to check in an expected-results output file, but a unitttest-based test should never have one of those. I noticed this because, on Windows, the final unittest output line contains the number of seconds needed to run the test, and that varied on *some* runs when I tried it, causing bogus test failures. Anyway, this gets rid of the expected-output file again, and changes the imports to work with 2.2's way of doing this.
* Backport of fix for SF bug #595671 from Python 2.3cvs:Barry Warsaw2002-08-151-0/+8
| | | | | | | | | base64.decodestring('') should return '' instead of raising an exception. The bug fix for SF #430849 wasn't quite right. This closes SF bug #595671. I'll backport this to Python 2.2. One addition here is that there was no test of the base64 module in Python 2.2 cvs yet, so I added that too.
* This commit was manufactured by cvs2svn to create branchcvs2svn2002-08-153-0/+83
| | | | 'release22-maint'.
* Backport:Guido van Rossum2002-08-011-4/+11
| | | | | | | | SF patch 588728 (Nathan Srebro). The __delete__ method wrapper for descriptors was not supported (I added a test, too.)
* Use sys.executable to run Python, as suggested by Neal Norwitz.Tim Peters2002-07-171-2/+3
|
* The atexit module effectively turned itself off if sys.exitfunc alreadyTim Peters2002-07-162-15/+48
| | | | | | | | | existed at the time atexit first got imported. That's a bug, and this fixes it. Also reworked test_atexit.py to test for this too, and to stop using an "expected output" file, and to test what actually happens at exit instead of just simulating what it thinks atexit will do at exit.
* Backport:Guido van Rossum2002-07-121-13/+0
| | | | | | | | | | Remove httplib from tested modules. The test of httplib makes it difficult to maintain httplib. There are two many idioms that pyclbr doesn't seem to understand, and I don't understand how to update these tests to make them work. Also remove commented out test of urllib2.
* Update output for new tests.Jeremy Hylton2002-07-121-0/+5
|
* Backport changes.Jeremy Hylton2002-07-121-5/+33
| | | | | | | | Change _begin() back to begin(). Fix for SF bug 579107. Fix for SF bug #432621: httplib: multiple Set-Cookie headers Fix SF bug #575360 Handle HTTP/0.9 responses.
* subtype_resurrection(): Removed unused import.Tim Peters2002-07-111-1/+0
|
* subtype_resurrection(): The test suite with -l properly reported theTim Peters2002-07-111-2/+13
| | | | immortal object here as a leak. Made the object mortal again at the end.
* Repaired optimistic comment in new test.Tim Peters2002-07-111-3/+2
|
* Attempting to resurrect a dying instance of a new-style class in aTim Peters2002-07-111-0/+21
| | | | | | | | | __del__ method died with Fatal Python error: GC object already in linked list in both release and debug builds. Fixed that. Added a new test that dies without the fix.