summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* random.gauss() uses a piece of hidden state used by nothing else,Tim Peters2002-05-051-0/+19
| | | | | | | | | | | and the .seed() and .whseed() methods failed to reset it. In other words, setting the seed didn't completely determine the sequence of results produced by random.gauss(). It does now. Programs repeatedly mixing calls to a seed method with calls to gauss() may see different results now. Bugfix candidate (random.gauss() has always been broken in this way), despite that it may change results.
* Remove all tests that rely on deprecated-in-2.2 features of xrange objects.Fred Drake2002-05-022-29/+0
| | | | | "What's New in Python 2.2" documented that these would be removed in Python 2.3.
* Added regression tests for xrange object attributes.Fred Drake2002-05-021-0/+23
| | | | See SF bug #551285.
* Buffer-object repitition and concatenation has worked all along; add a testFred Drake2002-05-021-0/+6
| | | | to make avoid regression.
* Fred's recent changes to support "-u all" resulted in subset resourceAndrew MacIntyre2002-04-301-1/+1
| | | | selections (eg "-u network") being ignored.
* builtin_zip(): Take a good guess at how big the result list will be,Tim Peters2002-04-291-0/+28
| | | | | | | and allocate it in one gulp. This isn't a bugfix, it's just a minor optimization that may or may not pay off.
* - New builtin function enumerate(x), from PEP 279. Example:Guido van Rossum2002-04-261-0/+118
| | | | | enumerate("abc") is an iterator returning (0,"a"), (1,"b"), (2,"c"). The argument can be an arbitrary iterable object.
* Add more tests for abstract isinstance() and issubclass().Neil Schemenauer2002-04-241-4/+93
|
* test_resource has no chance of running on Windows.Tim Peters2002-04-231-0/+1
|
* test_mmap started breaking on Windows, only when run after test_bsddb.Tim Peters2002-04-231-1/+1
| | | | | | | | | On Win2K it thought 'foo' started at byte offset 0 instead of at the pagesize, and on Win98 it thought 'foo' didn't exist at all. Somehow or other this is related to the new "in memory file" gimmicks in bsddb, but the old bsddb we use on Windows sucks so bad anyway I don't want to bother digging deeper. Flushing the file in test_mmap after writing to it makes the problem go away, so good enough.
* Unit tests for the changes in abstract.c version 2.101. The debugBarry Warsaw2002-04-231-0/+144
| | | | | | build's "undetected error" problems were originally detected with extension types, but we can whitebox test the same situations with new-style classes.
* Rewrote the PyUnit description so that it now recommends to useBarry Warsaw2002-04-231-6/+16
| | | | | run_suite() instead of run_unittest(). Best practice is to plan for multiple test classes.
* Add tests for the recent resource module change.Jeremy Hylton2002-04-232-0/+50
| | | | | | Also add a test that Python doesn't die with SIGXFSZ if it exceeds the file rlimit. (Assuming this will also test the behavior when the 2GB limit is exceed on a platform that doesn't have large file support.)
* There was a non-ascii character in the source. Replaced by a hex escape.Jack Jansen2002-04-231-1/+1
|
* don't fail if the audio device is busy, just skip.Anthony Baxter2002-04-231-1/+1
| | | | SF patch 545486
* SF patch [ 545523 ] patch for 514433 bsddb.dbopen (NULL)Anthony Baxter2002-04-231-19/+26
| | | | | | | | | | | | closes SF #514433 can now pass 'None' as the filename for the bsddb.*open functions, and you'll get an in-memory temporary store. docs are ripped out of the bsddb dbopen man page. Fred may want to clean them up. Considering this for 2.2, but not 2.1.
* Apply patch diff.txt from SF feature requestWalter Dörwald2002-04-222-1/+25
| | | | | | | | | http://www.python.org/sf/444708 This adds the optional argument for str.strip to unicode.strip too and makes it possible to call str.strip with a unicode argument and unicode.strip with a str argument.
* Enable universal newlines on Windows. Note that NEWS needs more words!Tim Peters2002-04-211-1/+0
|
* Assorted code cleanups for readability. Greatly boosted the size of theTim Peters2002-04-211-26/+33
| | | | | | test data: this test fails on WIndows now if universal newlines are enabled (which they aren't yet, by default). I don't know whether the test will also fail on Linux now.
* Add test for eval() w/ free variables.Jeremy Hylton2002-04-202-0/+11
| | | | Related to SF bug #505315
* Fix SF #544995 (zlib crash on second flush call)Jeremy Hylton2002-04-191-0/+6
| | | | | | Bug fix by mhammond. Bug fix candidate for 2.2, not present in 2.1.
* Fix bug 544473 - "Queue module can deadlock".Mark Hammond2002-04-191-0/+158
| | | | | Use try/finally to ensure all Queue locks remain stable. Includes test case. Bugfix candidate.
* ceval.c/do_raise(): Tighten the test to disallow raising an instance ofTim Peters2002-04-181-0/+26
| | | | | | | | a str subclass. test_descr.py/string_exceptions(): New sub-test. For 2.3 only. Guido doesn't want this backported.
* SF bug 544733: Cygwin test_mmap fix for Python 2.2.1Tim Peters2002-04-181-0/+2
| | | | | | | | 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).
* SF bug 542984.Guido van Rossum2002-04-181-0/+20
| | | | | | | | | | | Change type_get_doc (the get function for __doc__) to look in tp_dict more often, and if it finds a descriptor in tp_dict, to call it (with a NULL instance). This means you can add a __doc__ descriptor to a new-style class that returns instance docs when called on an instance, and class docs when called on a class -- or the same docs in either case, but lazily computed. I'll also check this into the 2.2 maintenance branch.
* Apply diff3.txt from SF patch http://www.python.org/sf/536241Walter Dörwald2002-04-172-0/+41
| | | | | | | | | 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.
* SF bug 544647.Guido van Rossum2002-04-161-0/+27
| | | | | | | | | PyNumber_InPlaceMultiply insisted on calling sq_inplace_repeat if it existed, even if nb_inplace_multiply also existed and the arguments weren't right for sq_inplace_repeat. Change this to only use sq_inplace_repeat if nb_inplace_multiply isn't defined. Bugfix candidate.
* test_mktime(): Removed. This wasn't really testing anything usefulBarry Warsaw2002-04-161-6/+0
| | | | | | (or platform independent). Closes SF bug #460357. Bug fix candidate.
* Whitespace normalization, while using non-whitespace literals forBarry Warsaw2002-04-161-26/+26
| | | | intended whitespace.
* Expect test_email_codecs to be skipped -- few users or developers willGuido van Rossum2002-04-161-0/+1
| | | | have the needed optional Japanese codecs installed.
* Apparently 3 of the tests here rely on trailing whitespace and/or hardTim Peters2002-04-161-26/+26
| | | | | tab characters, so reverting the whitespace normalization. Barry, please repair this.
* Fewer deprecation warnings.Tim Peters2002-04-161-0/+5
|
* Whitespace normalization.Tim Peters2002-04-1612-65/+62
|
* Tighten up some warning filters, and break some dependencies on theTim Peters2002-04-169-16/+34
| | | | order in which the tests are normally run.
* OK, don't call resetwarnings().Tim Peters2002-04-161-2/+0
|
* It makes more sense to call resetwarnings() after every test runs thanTim Peters2002-04-164-9/+4
| | | | to keep doing that in every test that wants to filter a warning.
* I expect test_univnewlines to be skipped on Windows. I expect thisTim Peters2002-04-151-0/+1
| | | | | because it *is* skipped. I'm not entirely sure it should be skipped, but figuring that out would take actual thought <wink>.
* Reduce the number of test-suite DeprecationWarnings; start addingTim Peters2002-04-153-3/+12
| | | | resetwarnings() calls too.
* test_main(): Added this so the test can actually get run under theBarry Warsaw2002-04-152-21/+20
| | | | | regrtest framework. Keep the original standalone-unittest scaffolding (i.e. suite() and __main__).
* Apply the second version of SF patch http://www.python.org/sf/536241Walter Dörwald2002-04-152-2/+22
| | | | | | | | | | Add a method zfill to str, unicode and UserString and change Lib/string.py accordingly. This activates the zfill version in unicodeobject.c that was commented out and implements the same in stringobject.c. It also adds the test for unicode support in Lib/string.py back in and uses repr() instead() of str() (as it was before Lib/string.py 1.62)
* SF bug #541883 (Vincent Fiack).Guido van Rossum2002-04-151-0/+6
| | | | | | | A stupid bug in object_set_class(): didn't check for value==NULL before checking its type. Bugfix candidate.
* SF bug 543840: complex(string) accepts strings with \0Tim Peters2002-04-141-0/+13
| | | | | | | complex_subtype_from_string(): this stopped parsing at the first 0 byte, as if that were the end of the input string. Bugfix candidate.
* Test suite for universal newline support.Jack Jansen2002-04-141-0/+114
|
* Patch #542569: tp_print tp_repr tp_str in test_bool.py.Martin v. Löwis2002-04-141-1/+18
|
* Partially implement SF feature request 444708.Guido van Rossum2002-04-131-0/+12
| | | | | | | | | | | | | Add optional arg to string methods strip(), lstrip(), rstrip(). The optional arg specifies characters to delete. Also for UserString. Still to do: - Misc/NEWS - LaTeX docs (I did the docstrings though) - Unicode methods, and Unicode support in the string methods.
* I am mad. This test never worked!Guido van Rossum2002-04-121-16/+14
| | | | | | | | | | | | | | | | | | | | | | The test function's signature should be test(methodname, input, output, *args) but the output argument was omitted. This caused all tests to fail, because the expected output was passed as the initial argument to the method call. But because of the way the test works (it compares the results for a regular string to the results for a UserString instance with the same value, and it's OK if both raise the same exception) the test never failed! I've fixed this, and also cleaned up a few warts in the verbose output. Finally, I've made it possible to run the test stand-alone in verbose mode by passing -v as a command line argument. Now, the test will report failure related to zfill. That's not my fault, that's a legitimate problem: the string_tests.py file contains a test for the zfill() method (just added) but this method is not implemented. The responsible party will surely fix this soon now.
* Add Raymond Hettinger's d.pop(). See SF patch 539949.Guido van Rossum2002-04-121-0/+15
|
* Clean up the "all" support for -u.Fred Drake2002-04-111-1/+2
|
* Since xmllib is deprecated now, suppress the DeprecationWarning its testTim Peters2002-04-111-1/+5
| | | | module necessarily raises.
* Ignore more deprecation warnings.Tim Peters2002-04-111-4/+6
|