summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* New test "+sort", tacking 10 random floats on to the end of a sortedTim Peters2002-07-211-6/+9
| | | | | | | | | | array. Our samplesort special-cases the snot out of this, running about 12x faster than *sort. The experimental mergesort runs it about 8x faster than *sort without special-casing, but should really do better than that (when merging runs of different lengths, right now it only does something clever about finding where the second run begins in the first and where the first run ends in the second, and that's more of a temp-memory optimization).
* Get popen test to work even if python is not in the pathNeal Norwitz2002-07-201-1/+1
|
* Added new test "3sort". This is sorted data but with 3 random exchanges.Tim Peters2002-07-201-1/+9
| | | | It's a little better than average for our sort.
* Move the setting of os.environ['LANGUAGE'] to setup(), and reset it toGuido van Rossum2002-07-201-1/+2
| | | | 'en' in teardown(). This way hopefully test_time.py won't fail.
* Shut the test up and add a missing importBarry Warsaw2002-07-192-2/+4
|
* The email package's tests live much better in a subpackageBarry Warsaw2002-07-192-2045/+4
| | | | | | | | | | | | (i.e. email.test), so move the guts of them here from Lib/test. The latter directory will retain stubs to run the email.test tests using Python's standard regression test. test_email_torture.py is a torture tester which will not run under Python's test suite because I don't want to commit megs of data to that project (it will fail cleanly there). When run under the mimelib project it'll stress test the package with megs of message samples collected from various locations in the wild.
* Follow PyXML: Remove all prints from successful tests. This means we canFred Drake2002-07-192-241/+14
| | | | also drop the output file.
* Remove a few lines that aren't used and cause problems on platformsGuido van Rossum2002-07-191-6/+0
| | | | | where recvfrom() on a TCP stream returns None for the address. This should address the remaining problems on FreeBSD.
* Pure Python strptime implementation by Brett Cannon. See SF patch 474274.Guido van Rossum2002-07-192-0/+291
| | | | Also adds tests.
* A few days ago, Guido said (in the thread "[Python-Dev] PythonMichael W. Hudson2002-07-191-0/+14
| | | | | | | | version of PySlice_GetIndicesEx"): > OK. Michael, if you want to check in indices(), go ahead. Then I did what was needed, but didn't check it in. Here it is.
* Add test for previous core dump when sending on closed socket withGuido van Rossum2002-07-191-1/+10
| | | | | | | | timeout. Added small sleeps to _testAccept() and _testRecv() in NonBlockingTCPTests, to reduce race conditions (I know, this is not the solution!)
* Add default timeout functionality. This adds setdefaulttimeout() andGuido van Rossum2002-07-181-0/+30
| | | | | getdefaulttimeout() functions to the socket and _socket modules, and appropriate tests.
* Gave this a facelift: "/" vs "//", whrandom vs random, etc. BoostedTim Peters2002-07-181-35/+46
| | | | | | | | | | | | | | the default range to end at 2**20 (machines are much faster now). Fixed what was quite a arguably a bug, explaining an old mystery: the "!sort" case here contructs what *was* a quadratic-time disaster for the old quicksort implementation. But under the current samplesort, it always ran much faster than *sort (the random case). This never made sense. Turns out it was because !sort was sorting an integer array, while all the other cases sort floats; and comparing ints goes much quicker than comparing floats in Python. After changing !sort to chew on floats instead, it's now slower than the random sort case, which makes more sense (but is just a few percent slower; samplesort is massively less sensitive to "bad patterns" than quicksort).
* Gave hotshot.LogReader a close() method, to allow users to close theTim Peters2002-07-181-4/+1
| | | | | file object that LogReader opens. Used it then in test_hotshot; the test passes again on Windows. Thank Guido for the analysis.
* test_hotshot fails on Windows now. Added XXX comment explaining why,Tim Peters2002-07-171-0/+4
| | | | and that I don't know how to fix it. Fred?
* Add a test for the 'closed' attribute on the C-profiler object.Guido van Rossum2002-07-171-0/+3
|
* Add missing comma.Jeremy Hylton2002-07-171-1/+1
|
* Add a rather generous set of tests allowed to be skipped on sunos5.Guido van Rossum2002-07-171-0/+23
|
* Use sys.executable to run Python, as suggested by Neal Norwitz.Tim Peters2002-07-171-2/+3
|
* Bunch of tests to make sure that StopIteration is a sink state.Guido van Rossum2002-07-161-0/+76
|
* Whitespace normalization.Tim Peters2002-07-167-34/+32
|
* 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. Bugfix candidate, but it's messy so I'll backport to 2.2 myself.
* Tim_one's change to aggressively overallocate nodes when adding childAndrew MacIntyre2002-07-151-9/+2
| | | | | | nodes (in Parser/node.c) resolves the gross memory consumption exhibited by the EMX runtime on OS/2, so the test should be exercised on this platform.
* Remove httplib from tested modules.Jeremy Hylton2002-07-121-15/+0
| | | | | | | | 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.
* Change _begin() back to begin().Jeremy Hylton2002-07-121-3/+3
| | | | Client code could create responses explicitly.
* test_trashcan() and supporting class Ouch(): Jeremy noted that this testTim Peters2002-07-111-3/+9
| | | | | | | | | | | | | | takes much longer to run in the context of the test suite than when run in isolation. That's because it forces a large number of full collections, which take time proportional to the total number of gc'ed objects in the whole system. But since the dangerous implementation trickery that caused this test to fail in 2.0, 2.1 and 2.2 doesn't exist in 2.3 anymore (the trashcan mechanism stopped doing evil things when the possibility for compiling without cyclic gc was taken away), such an expensive test is no longer justified. This checkin leaves the test intact, but fiddles the constants to reduce the runtime by about a factor of 5.
* subtype_resurrection(): Removed unused import.Tim Peters2002-07-111-1/+0
|
* Extend function() to support an optional closure argument.Jeremy Hylton2002-07-111-0/+24
| | | | Also, simplify some ref counting for other optional arguments.
* 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-4/+3
|
* Added a test that provokes the hypothesized (in my last checkin comment)Tim Peters2002-07-111-0/+20
| | | | | | | | | | | debug-build failure when an instance of a new-style class is resurrected by a __del__ method -- we simply never had any code that tried this. This is already fixed in 2.3 CVS. In 2.2.1, it blows up via Fatal Python error: GC object already in linked list I'll fix it in 2.2.1 CVS next.
* assertHasattr(): Made failure msg better than useless.Tim Peters2002-07-101-1/+4
| | | | test_others(): httplib failed in two new ways. Blame Thumb Boy <wink>.
* ndiffAssertEqual(): Stringify the arguments before runningBarry Warsaw2002-07-091-4/+16
| | | | | | | .splitlines() on them, since they may be Header instances. test_multilingual(), test_header_ctor_default_args(): New tests of make_header() and that Header can take all default arguments.
* Fix SF Bug 564931: compile() traceback must include filename.Thomas Heller2002-07-091-0/+9
|
* TestEmailBase.ndiffAssertEqual(): Python 2.1's difflib doesn't have anBarry Warsaw2002-07-091-32/+186
| | | | | | | | | | ndiff function, so just alias it to assertEqual in that case. Various: make sure all openfile()/read()'s are wrapped in try/finally's so the file gets closed. A bunch of new tests checking the corner cases for multipart/digest and message/rfc822.
* New files which test the corners of multipart/message andBarry Warsaw2002-07-092-0/+48
| | | | message/rfc822 compliance.
* Got rid of special case for Macintosh realloc slowdown: Tim fixed the problem.Jack Jansen2002-07-082-6/+1
|
* Fix for SF bug #432621: httplib: multiple Set-Cookie headersJeremy Hylton2002-07-072-2/+23
| | | | | | | | | | If multiple header fields with the same name occur, they are combined according to the rules in RFC 2616 sec 4.2: Appending each subsequent field-value to the first, each separated by a comma. The order in which header fields with the same field-name are received is significant to the interpretation of the combined field value.
* printlist(): Replaced the guts with a call to textwrap. Yay!Tim Peters2002-07-041-30/+19
|
* Implement the encoding argument for toxml and toprettyxml.Martin v. Löwis2002-06-302-0/+11
| | | | Document toprettyxml.
* Another test of long headers.Barry Warsaw2002-06-292-0/+19
|
* Oleg Broytmann's support for RFC 2231 encoded parameters, SF patch #549133Barry Warsaw2002-06-292-1/+34
| | | | New test cases.
* test_multilingual(): Test for Header.__unicode__().Barry Warsaw2002-06-291-0/+22
|
* Track change of begin() to _begin().Jeremy Hylton2002-06-281-2/+2
|
* Lots of new and updated tests to check for proper ascii headerBarry Warsaw2002-06-282-42/+187
| | | | | | | folding. Note that some of the Japanese tests have changed, but I don't really know if they are correct or not. :( Someone with Japanese and RFC 2047 expertise, please take a look!
* Added character data buffering to pyexpat parser objects.Fred Drake2002-06-281-1/+94
| | | | | | | | | Setting the buffer_text attribute to true causes the parser to collect character data, waiting as long as possible to report it to the Python callback. This can save an enormous number of callbacks from C to Python, which can be a substantial performance improvement. buffer_text defaults to false.
* Integrate the tests for name interning from PyXML (test_pyexpat.pyFred Drake2002-06-271-0/+18
| | | | revision 1.12 in PyXML).
* Suppress the variable verbose output from test.xmltests; the inclusion ofFred Drake2002-06-262-15/+3
| | | | timing information in the output makes the determination of success bogus.
* Add convenience module to run all the XML tests.Fred Drake2002-06-252-0/+395
|
* Fix SF bug 572567: Memory leak in object comparison.Raymond Hettinger2002-06-241-0/+12
|