summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* Convert file.readinto() to stop using METH_OLDARGS & PyArg_Parse.Neal Norwitz2002-04-011-0/+15
| | | | Add test for file.readinto().
* As part of fixing bug #536241, add a test case for string.zfill() with UnicodeAndrew M. Kuchling2002-03-291-1/+4
|
* Add two tests for string.zfillAndrew M. Kuchling2002-03-291-0/+3
|
* test_trashcan: reword obscure code.Tim Peters2002-03-281-1/+1
| | | | Bugfix candidate.
* New test_traschcan() test in test_gc, which reliably provokes segfaultsTim Peters2002-03-281-0/+29
| | | | | | under 2.0, 2.1 and 2.2. Bugfix candidate.
* Add a simple test of the METH_CLASS and METH_STATIC flags for type methods.Fred Drake2002-03-281-0/+30
|
* Add tests for the iterkeys, itervalues and iteritemsWalter Dörwald2002-03-251-0/+29
| | | | methods in dict-proxy objects.
* SF bug 480215: softspace confused in nested printTim Peters2002-03-241-0/+14
| | | | | | | | | | This fixes the symptom, but PRINT_ITEM has no way to know what (if anything) PyFile_WriteObject() writes unless the object being printed is a string. When the object isn't a string, this fix retains the guess that softspace should be set after PyFile_WriteObject(). We might want to say that it's the job of filelike-object write methods to leave the file's softspace in the correct state. That would probably be better -- but everyone relies on PRINT_ITEM to guess for them now.
* add test for InvalidURLSkip Montanaro2002-03-241-0/+2
|
* add test of InvalidURLSkip Montanaro2002-03-241-0/+10
|
* Add more tests for built-in types. Add tests for buffer objects.Neil Schemenauer2002-03-242-0/+119
| | | | Closes SF patch 494871.
* added RFC 2396 tests from Aaron Swartz included in bug # 450225.Skip Montanaro2002-03-231-74/+116
| | | | converted to use unittest
* no longer needed - converted test_urlparse.py to use unittestSkip Montanaro2002-03-231-46/+0
|
* SF bug 533234: tm_isdst > 1 Passed to strftime.Tim Peters2002-03-231-0/+23
| | | | | | | | | | | One more time on this turkey, but duller instead of cleverer. Curious: The docs say __getslice__ has been deprecated since 2.0, but list.__getitem__ still doesn't work if you pass it a slice. This makes it a lot clearer to emulate a list by *being* a list <wink>. Bugfix candidate. Michael, just pile this patch on top of the others that went by -- no need to try to pick these apart.
* Add a simple test suite for netrc.py, and remove it from test_sundryAndrew M. Kuchling2002-03-222-1/+43
|
* Do not insert characters for unicode-escape decoders if the error modeMartin v. Löwis2002-03-211-0/+8
| | | | is "ignore". Fixes #529104.
* amk's fix attached toMichael W. Hudson2002-03-182-0/+23
| | | | [ 516299 ] urlparse can get fragments wrong
* Fix for SF bug 528132 (Armin Rigo): classmethod().__get__() segfaultGuido van Rossum2002-03-181-0/+5
| | | | | | | | | | | The proper fix is not quite what was submitted; it's really better to take the class of the object passed rather than calling PyMethod_New with NULL pointer args, because that can then cause other core dumps later. I also added a testcase for the fix to classmethods() in test_descr.py. I've already applied this to the 2.2 branch.
* initial test_anydbm module - based on test_dumbdbm.pySkip Montanaro2002-03-181-0/+96
|
* restructure a bit to not rely on test case execution orderingSkip Montanaro2002-03-171-4/+28
| | | | add test case for bug #482460
* Skip test_longexp for MacPython on Mac OS X. It triggers a pathological ↵Jack Jansen2002-03-151-1/+5
| | | | | | realloc slowdown. Some tests with shorter expressions lead me to the conclusion that it will eventually finish, but it may take a few weeks:-) 2.2.1 candidate.
* added test case to catch index errors with _localized_name classSkip Montanaro2002-03-151-0/+4
|
* first cut at skip-list for hp-ux 11 based upon input from Bill Lawler at HP.Skip Montanaro2002-03-151-0/+30
|
* "Fix" for SF bug #520644: __slots__ are not pickled.Guido van Rossum2002-03-141-0/+89
| | | | | | | | | | | As promised in my response to the bug report, I'm not really fixing it; in fact, one could argule over what the proper fix should do. Instead, I'm adding a little magic that raises TypeError if you try to pickle an instance of a class that has __slots__ but doesn't define or override __getstate__. This is done by adding a bozo __getstate__ that always raises TypeError. Bugfix candidate (also the checkin to typeobject.c, of course).
* Test for the fix I just checked in to moduleobject.c.Guido van Rossum2002-03-121-0/+12
| | | | Bugfix candidate.
* Change Windows file.truncate() to (a) restore the original file position,Tim Peters2002-03-121-9/+15
| | | | | | | | | | | | and (b) stop trying to prevent file growth. Beef up the file.truncate() docs. Change test_largefile.py to stop assuming that f.truncate() moves the file pointer to the truncation point, and to verify instead that it leaves the file position alone. Remove the test for what happens when a specified size exceeds the original file size (it's ill-defined, according to the Single Unix Spec).
* Fix typoNeal Norwitz2002-03-111-1/+1
|
* Add a check that SF bug 516727 is really fixed.Guido van Rossum2002-03-111-0/+10
|
* file_truncate(): provide full "large file" support on Windows, byTim Peters2002-03-111-15/+24
| | | | | | | | | | | | | | | | | | | | dropping MS's inadequate _chsize() function. This was inspired by SF patch 498109 ("fileobject truncate support for win32"), which I rejected. libstdtypes.tex: Someone who knows should update the availability blurb. For example, if it's available on Linux, it would be good to say so. test_largefile: Uncommented the file.truncate() tests, and reworked to do more. The old comment about "permission errors" in the truncation tests under Windows was almost certainly due to that the file wasn't open for *write* access at this point, so of course MS wouldn't let you truncate it. I'd be appalled if a Unixish system did. CAUTION: Someone should run this test on Linux (etc) too. The truncation part was commented out before. Note that test_largefile isn't run by default.
* Bugfix candidate.Guido van Rossum2002-03-111-0/+3
| | | | | | | Adapter from SF patch 528038; fixes SF bug 527816. The wrapper for __nonzero__ should be wrap_inquiry rather than wrap_unaryfunc, since the slot returns an int, not a PyObject *.
* SF patch 499062: Minor typo in test_generators.py.Tim Peters2002-03-101-1/+1
| | | | | | There's no actual patch there. It's an objection that Guido's example doesn't actually generator "leaves", so change the comment that says it does.
* Fix pyclbr test of httplib without really understanding pyclbr.Jeremy Hylton2002-03-081-1/+2
| | | | | It seems that the new class HTTP11 in httplib.test() isn't discoverable by pyclbr, which causes this test to fail.
* As part of fixing bug #523301, add a simple test of ConfigParser.write()Andrew M. Kuchling2002-03-082-0/+30
|
* SF bug 515943: searching for data with \0 in mmap.Tim Peters2002-03-081-0/+25
| | | | | | | | | mmap_find_method(): this obtained the string to find via s#, but it ignored its length, acting as if it were \0-terminated instead. Someone please run on Linux too (the extended test_mmap works on Windows). Bugfix candidate.
* Test forMichael W. Hudson2002-03-061-0/+12
| | | | | | [ 526039 ] devious code can crash structseqs Bugfix candidate.
* Special support for pickling os.stat and os.stat_vfs results portablyMichael W. Hudson2002-03-061-0/+11
| | | | | | | | (the types come from different modules on different platforms). Added tests for pickling these types. May be a bugfix candidate.
* A fix & test forMichael W. Hudson2002-03-051-0/+7
| | | | | | | | [ 496873 ] structseqs unpicklable by adding a __reduce__ method to structseqs. Will also commit this to the 2.2.1 branch momentarily.
* SF #506611, fix sys.setprofile(), sys.settrace() core dumpsNeal Norwitz2002-03-032-0/+10
| | | | when no arguments are passed
* _PyLong_Copy(): was creating a copy of the absolute value, but shouldTim Peters2002-03-021-0/+1
| | | | | | copy the sign too. Added a test to test_descr to ensure that it does. Bugfix candidate.
* SF patch 514641 (Naofumi Honda) - Negative ob_size of LongObjectsGuido van Rossum2002-03-011-0/+4
| | | | | | | | | | Due to the bizarre definition of _PyLong_Copy(), creating an instance of a subclass of long with a negative value could cause core dumps later on. Unfortunately it looks like the behavior of _PyLong_Copy() is quite intentional, so the fix is more work than feels comfortable. This fix is almost, but not quite, the code that Naofumi Honda added; in addition, I added a test case.
* Patch 520694: arraymodule.c improvements:Martin v. Löwis2002-03-011-4/+141
| | | | | | - make array.array a type - add Py_UNICODE arrays - support +=, *=
* Correct various errors:Martin v. Löwis2002-02-281-0/+141
| | | | | | | - Use substring search, not re search for user-agent and paths. - Consider * entry last. Unquote, then requote URLs. - Treat empty Disallow as "allow everything". Add test cases. Fixes #523041
* SF patch #523169, by Samuele Pedroni.Guido van Rossum2002-02-263-1/+14
| | | | | | There were never tests for the fact that list() always returns a *new* list object, even when the argument is a list, while tuple() may return a reference to the argument when it is a tuple. Now there are.
* OS/2 EMX port Library and regression test changes:Andrew MacIntyre2002-02-242-9/+22
| | | | | | | | | | | Lib/ os.py os2emxpath.py // added - OS/2 EMX specific path manipulation routines popen2.py site.py Lib/test/ test_fcntl.py test_longexp.py
* Somebody made list.__dict__ grow a '__doc__' key, but apparently didn'tTim Peters2002-02-191-0/+1
| | | | | run the test suite afterwards. Either that, or whether '__doc__' shows up is platform-dependent!
* Whitespace normalization.Tim Peters2002-02-161-1/+1
|
* SF bug #516372: test_thread: unhandled exc. in threadTim Peters2002-02-162-5/+13
| | | | | | | | Fix exit races in test_thread.py and test_threaded_import.py. I suspect the bug is provokable only under Linux (where child threads seem to get lots of cycles before they get killed after the main thread exits), or on multi-processor machines running other OSes. Bugfix candidate.
* Added regression test for start()/stop() returning bogus NULL.Fred Drake2002-02-081-0/+10
|
* Fix typoNeal Norwitz2002-02-081-1/+1
|
* Fix to the UTF-8 encoder: it failed on 0-length input strings.Marc-André Lemburg2002-02-072-24/+34
| | | | | | | | | | | | | | Fix for the UTF-8 decoder: it will now accept isolated surrogates (previously it raised an exception which causes round-trips to fail). Added new tests for UTF-8 round-trip safety (we rely on UTF-8 for marshalling Unicode objects, so we better make sure it works for all Unicode code points, including isolated surrogates). Bumped the PYC magic in a non-standard way -- please review. This was needed because the old PYC format used illegal UTF-8 sequences for isolated high surrogates which now raise an exception.