summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* Stop creating an unbounded number of "Jack is my hero" files under Windows.Tim Peters2001-01-171-0/+1
| | | | | Not that Jack doesn't deserve them, but saying it so often cheapens the sentiment.
* This patch adds a new builtin unistr() which behaves like str()Marc-André Lemburg2001-01-172-0/+12
| | | | | | | | | | except that it always returns Unicode objects. A new C API PyObject_Unicode() is also provided. This closes patch #101664. Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
* Fix a bizarre typo in the helper class ComparableException: theGuido van Rossum2001-01-171-1/+1
| | | | | | | | | | | | | __getattr__() method, which clearly (like the other methods) was intended to pass the __getattr__() call on to the self.err object, mistakenly returned getattr(self, self.err) rather than getattr(self.err, attr). Since self.err is not a string, this always raises a TypeError. Apparently that doesn't bother for the one attribute for which __getattr__() is actually called ('__coerce__'), but it broke the rich comparisons stuff that I'm trying to get into shape, so I'm fixing this now. (I could also simply remove the __getattr__() method, but fixing it seems more in the spirit of what the ComparableException class is trying to do.)
* Changed name of codec to full path name. This allows importingMarc-André Lemburg2001-01-171-1/+1
| | | | the test_charmapcodec test via the test package.
* Use __name__ instead of "test_regex" as the module name in theGuido van Rossum2001-01-171-1/+1
| | | | | warnings.filterwarnings() call. This suppresses the warning when the module is imported with its full name (test.test_regex) too.
* Added checks to prevent PyUnicode_Count() from dumping coreMarc-André Lemburg2001-01-162-0/+11
| | | | | | | | | | | | in case the parameters are out of bounds and fixes error handling for .count(), .startswith() and .endswith() for the case of mixed string/Unicode objects. This patch adds Python style index semantics to PyUnicode_Count() indices (including the special handling of negative indices). The patch is an extended version of patch #103249 submitted by Michael Hudson (mwh) on SF. It also includes new test cases.
* bumped SRE version number to 2.1. cleaned up and added 1.5.2Fredrik Lundh2001-01-161-7/+17
| | | | compatibility patches.
* Ugh. Sorry. Checked in the wrong file. Please ignore revision 1.3;Ka-Ping Yee2001-01-151-154/+154
| | | | it anticipates another patch i was about to propose.
* better format names and error messagesKa-Ping Yee2001-01-151-2/+2
|
* This patch makes sure that the function name always appears in the errorKa-Ping Yee2001-01-153-11/+116
| | | | | | | message, and tries to make the messages more consistent and helpful when the wrong number of arguments or duplicate keyword arguments are supplied. Comes with more tests for test_extcall.py and and an update to an error message in test/output/test_pyexpat.
* Add tokenizer support and tests for u'', U"", uR'', Ur"", etc.Ka-Ping Yee2001-01-152-365/+435
|
* Add a test case suggested by Guido, where a method is created with theBarry Warsaw2001-01-151-0/+38
| | | | new module.
* Committing PEP 232, function attribute feature, approved by Guido.Barry Warsaw2001-01-152-0/+103
| | | | | | Closes SF patch #103123. Regression test for function attributes, with output file.
* from the really-stupid-bug department: uppercase literals should matchFredrik Lundh2001-01-151-5/+17
| | | | | | | uppercase strings also when the IGNORECASE flag is set (bug #128899) (also added test cases for recently fixed bugs to the regression suite -- or in other words, check in re_tests.py too...)
* -- don't use recursion for unbounded non-greedy repeatFredrik Lundh2001-01-141-1/+1
| | | | | | | | (bugs #115903, #115696) This is based on a patch by Darrel Gallion. I'm not 100% sure about this fix, but I haven't managed to come up with any test case it cannot handle...
* reapplied Fred's "recommended style" patch...Fredrik Lundh2001-01-141-8/+8
|
* SRE fixes for 2.1 alpha:Fredrik Lundh2001-01-141-8/+8
| | | | | | | | | | -- added some more docstrings -- fixed typo in scanner class (#125531) -- the multiline flag (?m) should't affect the \Z operator (#127259) -- fixed non-greedy backtracking bug (#123769, #127259) -- added sre.DEBUG flag (currently dumps the parsed pattern structure) -- fixed a couple of glitches in groupdict (the #126587 memory leak had already been fixed by AMK)
* SF bug 128713: type(mmap_object) blew up on Linux.Tim Peters2001-01-142-0/+3
|
* Fix stupidity.Tim Peters2001-01-131-1/+1
|
* Guido found a brand new race in tempfile on Linux, due to Linux changingTim Peters2001-01-132-0/+90
| | | | | | | | | | | | pid across threads (but in that case, it's still the same process, and so still sharing the "template" cache in tempfile.py). Repaired that, and added a new std test. On Linux, someone please run that standalone with more files and/or more threads; e.g., python lib/test/test_threadedtempfile.py -f 1000 -t 10 to run with 10 threads each creating (and deleting) 1000 temp files.
* Moved the test codec definition to a new module and updated the test andMarc-André Lemburg2001-01-103-54/+97
| | | | | | | codec to test all charmap codec features. As side-effect of moving the test codec into a new module, the encodings package codec import mechanism is checked as well.
* Assorted xreadlines problems:Tim Peters2001-01-092-9/+10
| | | | | | | Wasn't built on Windows; not in config.c either. Module init function missing DL_EXPORT magic. test_xreadline output file obviously wrong (started w/ "test_xrl"). test program very unclear about what was expected.
* Test for xreadline.Guido van Rossum2001-01-092-0/+46
|
* 18 isn't a prime (duh).Tim Peters2001-01-081-1/+1
|
* MS Win32 .readline() speedup, as discussed on Python-Dev. This is a trickyTim Peters2001-01-072-0/+61
| | | | | | variant that never needs to "search from the right". Also fixed unlikely memory leak in get_line, if string size overflows INTMAX. Also new std test test_bufio to make sure .readline() works.
* Add more regression tests, including for the import statement variations.Fred Drake2001-01-072-10/+60
| | | | | These will detect regression on SF bug #127271 and other import statement bugs.
* This patch adds a new feature to the builtin charmap codec:Marc-André Lemburg2001-01-062-0/+66
| | | | | | | | | | | | | | | the mapping dictionaries can now contain 1-n mappings, meaning that character ordinals may be mapped to strings or Unicode object, e.g. 0x0078 ('x') -> u"abc", causing the ordinal to be replaced by the complete string or Unicode object instead of just one character. Another feature introduced by the patch is that of mapping oridnals to the emtpy string. This allows removing characters. The patch is different from patch #103100 in that it does not cause a performance hit for the normal use case of 1-1 mappings. Written by Marc-Andre Lemburg, copyright assigned to Guido van Rossum.
* Add test cases based on RFC 1808. So now we actually have a test suiteFred Drake2001-01-052-0/+106
| | | | | | | the urljoin() function, which exercises the urlparse() and urlunparse() functions as side effects. (Moshe, why did we have perfectly empty tests checked in for this?)
* When a PyCFunction that takes only positional parameters is called withFred Drake2001-01-042-1/+22
| | | | | | | | | | an empty keywords dictionary (via apply() or the extended call syntax), the keywords dict should be ignored. If the keywords dict is not empty, TypeError should be raised. (Between the restructuring of the call machinery and this patch, an empty dict in this situation would trigger a SystemError via PyErr_BadInternalCall().) Added regression tests to detect errors for this.
* No more RCmp.Neil Schemenauer2001-01-041-22/+1
|
* Sequence repeat works now for in-place multiply with an integer typeNeil Schemenauer2001-01-041-4/+4
| | | | as the left operand. I don't know if this is a feature or a bug.
* __rcmp__ no longer gets called on instances. Remove the test for it.Neil Schemenauer2001-01-041-12/+1
|
* Numbers no longer compare smaller than all other types. Fix the onlyNeil Schemenauer2001-01-041-1/+2
| | | | part of the testsuite that breaks. The old behavior may be restored.
* Actually call the object with an __call__ method, instead of justJeremy Hylton2001-01-031-0/+1
| | | | | checking if it is callable. This is the only place in the test suite where an __call__ method is called.
* This patch changes the default behaviour of the builtin charmapMarc-André Lemburg2001-01-031-2/+3
| | | | | | | | | | | | | | | | codec to not apply Latin-1 mappings for keys which are not found in the mapping dictionaries, but instead treat them as undefined mappings. The patch was originally written by Martin v. Loewis with some additional (cosmetic) changes and an updated test script by Marc-Andre Lemburg. The standard codecs were recreated from the most current files available at the Unicode.org site using the Tools/scripts/gencodec.py tool. This patch closes the bugs #116285 and #119960.
* Use == rather than cmp(). The return value of cmp() is not well defined whenNeil Schemenauer2001-01-032-128/+130
| | | | comparing different types.
* Use numbers that can be accurately represented on binary machines. I hopeNeil Schemenauer2001-01-032-587/+587
| | | | this works on all platforms.
* Add forgotten importAndrew M. Kuchling2001-01-021-0/+1
|
* Add more tests for compare and coercion in preparation for the coercionNeil Schemenauer2001-01-024-0/+1346
| | | | overhaul. Closes SF patch #102878.
* Added test case for legal DOM childrenAndrew M. Kuchling2000-12-312-2/+28
|
* Christmas present to myself: changed regrtest in two ways:Tim Peters2000-12-301-4/+30
| | | | | | | | | | | | | 1. When running in verbose mode, if any test happens to pass, print a warning that the apparent success may be bogus (stdout isn't compared in verbose mode). Been fooled by that too often. 2. When a test fails because the expected stdout doesn't match the actual stdout, print as much of stdout as did match before the first failing write. Else we get failures of the form "expected 'a', got 'b'" and a glance at the expected output file shows 500 instances of 'a' -- no idea where it failed, and, as in #1, trying to run in verbose mode instead doesn't help because stdout isn't compared then.
* Fred, THIS NEEDS DOCS! The function docstrings tell the tale.Tim Peters2000-12-292-0/+128
| | | | | | | | | | | | | Christmas present to myself: the bisect module didn't define what happened if the new element was already in the list. It so happens that it inserted the new element "to the right" of all equal elements. Since it wasn't defined, among other bad implications it was a mystery how to use bisect to determine whether an element was already in the list (I've seen code that *assumed* "to the right" without justification). Added new methods bisect_left and insort_left that insert "to the left" instead; made the old names bisect and insort aliases for the new names bisect_right and insort_right; beefed up docstrings to explain what these actually do; and added a std test for the bisect module.
* Add test case for SF bugTim Peters2000-12-271-0/+9
| | | | https://sourceforge.net/bugs/?func=detailbug&bug_id=126863&group_id=5470
* The "context" parameter to the ExternalEntityRefParameter exposes internalFred Drake2000-12-232-4/+44
| | | | | | | | | information from the Expat library that is not part of its public API. Do not print this information as the format of the string may (and will) change as Expat evolves. Add additional tests to make sure the ParserCreate() function raises the right exceptions on illegal parameters.
* The regression test for the regex module should not trip the deprecationFred Drake2000-12-231-0/+3
| | | | warning for that module, so suppress just that one warning.
* Change expected message for ValueError, fixing bug #126400Andrew M. Kuchling2000-12-201-1/+1
|
* Use binary mode to open "wave" files.Guido van Rossum2000-12-191-2/+2
|
* Test more split argument combinations:Guido van Rossum2000-12-191-0/+7
| | | | | | 1) multi-char separator 2) multi-char separator that only occurs at last position 3) all of the above with mixed Unicode and 8-bit-string arguments
* Test some Unicode pickling endcases.Guido van Rossum2000-12-191-0/+12
|
* gdbm.open() no longer accepts garbage in the flags string. Fix the tests.Neil Schemenauer2000-12-181-2/+7
|