summaryrefslogtreecommitdiffstats
path: root/Lib/test/output
Commit message (Collapse)AuthorAgeFilesLines
* [ #403753 ] zlib decompress; uncontrollable memory usageJeremy Hylton2001-10-161-0/+3
| | | | | | | | | | | | | Mostly by Toby Dickenson and Titus Brown. Add an optional argument to a decompression object's decompress() method. The argument specifies the maximum length of the return value. If the uncompressed data exceeds this length, the excess data is stored as the unconsumed_tail attribute. (Not to be confused with unused_data, which is a separate issue.) Difference from SF patch: Default value for unconsumed_tail is "" rather than None. It's simpler if the attribute is always a string.
* Covert pickle tests to use unittest.Jeremy Hylton2001-10-152-26/+0
| | | | | Extend tests to cover a few more cases. For cPickle, test several of the undocumented features.
* Added tests that check getboolean() with the newly allowed values fromFred Drake2001-10-081-0/+1
| | | | SF patch #467580.
* Hopefully fix the profiler right. Add a test suite that checks thatGuido van Rossum2001-10-041-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it deals correctly with some anomalous cases; according to this test suite I've fixed it right. The anomalous cases had to do with 'exception' events: these aren't generated when they would be most helpful, and the profiler has to work hard to recover the right information. The problems occur when C code (such as hasattr(), which is used as the example here) calls back into Python code and clears an exception raised by that Python code. Consider this example: def foo(): hasattr(obj, "bar") Where obj is an instance from a class like this: class C: def __getattr__(self, name): raise AttributeError The profiler sees the following sequence of events: call (foo) call (__getattr__) exception (in __getattr__) return (from foo) Previously, the profiler would assume the return event returned from __getattr__. An if statement checking for this condition and raising an exception was commented out... This version does the right thing.
* Update the xml.dom.minidom tests to cover the DOM-compliant parts of theFred Drake2001-09-281-0/+3
| | | | NodeList interface.
* Test case for SF bugs #463359 and #462937, added to test_grammar for lack ofThomas Wouters2001-09-261-0/+1
| | | | | a better place. Excessively fragile code, but at least it breaks when something in this area changes!
* Converted test_StringIO.py to use unittest, soBarry Warsaw2001-09-221-21/+0
| | | | | | | Lib/test/output/test_StringIO is no longer necessary. Also, added a test of the iterator protocol that's just been added to StringIO's and cStringIO's.
* Fix Unicode .join() method to raise a TypeError for sequenceMarc-André Lemburg2001-09-201-1/+0
| | | | | | | | | | elements which are not Unicode objects or strings. (This matches the string.join() behaviour.) Fix a memory leak in the .join() method which occurs in case the Unicode resize fails. Restore the test_unicode output.
* Update test output after the unicode() change.Marc-André Lemburg2001-09-201-0/+1
|
* New restriction on pow(x, y, z): If z is not None, x and y must be ofTim Peters2001-09-031-4/+0
| | | | | integer types, and y must be >= 0. See discussion at http://sf.net/tracker/index.php?func=detail&aid=457066&group_id=5470&atid=105470
* Add tests for augmented floor divisionJeremy Hylton2001-08-291-0/+3
|
* Undo previous checkin -- Barry fixed it better.Guido van Rossum2001-08-241-2/+0
|
* Update test output to match new (more informative) error message aboutGuido van Rossum2001-08-241-2/+2
| | | | calling unbound method with wrong first argument.
* Looks like someone forgot the change the expected output file.Tim Peters2001-08-241-14/+14
|
* Remove test_long's expected-output file.Tim Peters2001-08-231-5/+0
|
* Fix SF bug [ #450245 ] Error in parsing future stmtsJeremy Hylton2001-08-201-0/+1
| | | | | Add test case to cover multiple future statements on separate lines of a module.
* The change of type(None).__name__ from 'None' to 'NoneType' broke thisGuido van Rossum2001-08-161-2/+2
| | | | test in a trivial way. Fixed.
* Added tests for rich comparison operator functions.Fred Drake2001-08-111-41/+0
| | | | Converted tests to PyUnit.
* Added tests for operator.floordiv() and operator.truediv().Fred Drake2001-08-091-0/+2
|
* Add a test that xml.sax.saxutils.XMLGenerator does the right thingFred Drake2001-08-071-1/+2
| | | | | | when quoting attribute values that contain single & double quotes. This provides the rest of the regression test for SF bug #440351.
* test_codeup should not have had an expected-output file; removing it.Tim Peters2001-07-301-10/+0
|
* Fix for SF bug [ #443866 ] Evaluating func_code causing core dumpJeremy Hylton2001-07-301-0/+1
| | | | Add test that calls eval with a code object that has free variables.
* Patch #442866: Tests for codeop.py.Martin v. Löwis2001-07-301-0/+10
|
* Cosmetic: break the long lines in test_ntpath.py, and get rid of itsTim Peters2001-07-191-2/+0
| | | | expected-output file.
* Added function xml.sax.saxutils.quoteattr().Fred Drake2001-07-191-1/+5
| | | | This closes SF bug #440351. It should not be moved to Python 2.1.1.
* Convert the parser module test to use PyUnit.Fred Drake2001-06-041-92/+0
|
* Implement testGetElementsByTagNameNS.Martin v. Löwis2001-06-031-0/+1
|
* The one-line output files are no longer needed, so do not keep them.Fred Drake2001-05-291-1/+0
|
* Variety of test cases for call to builtin functionsJeremy Hylton2001-05-291-0/+1
|
* Remove test_doctest's expected-output file.Tim Peters2001-05-231-301/+0
| | | | | | Change test_doctest and test_difflib to pass regrtest's notion of verbosity on to doctest. Add explanation for a dozen "new" things to test/README.
* Remove test_difflib's output file and change test_difflib to stopTim Peters2001-05-231-280/+0
| | | | | generating it. Since this is purely a doctest, the output file never served a good purpose.
* Remove output files that are no longer needed since the correspondingFred Drake2001-05-222-11/+0
| | | | tests were moved to PyUnit.
* Move the sha tests to PyUnit.Fred Drake2001-05-221-4/+0
|
* Migrate the strop test to PyUnit.Fred Drake2001-05-221-3/+0
|
* Remove all files of expected output that contain only the name of theFred Drake2001-05-2165-65/+0
| | | | | test; there is no need to store this in a file if the actual test code does not produce any output.
* Re-write the mailbox test suite to use PyUnit. Cover a lot more groundFred Drake2001-05-211-1/+0
| | | | | for the Maildir mailbox format. This still does not address other mailbox formats.
* Added test suite for the new HTMLParser module, originally from theFred Drake2001-05-181-0/+1
| | | | | TAL/PageTemplate package for Zope. This only needed a little boilerplate change; the tests themselves are unchanged.
* SF bug[ #423781: pprint.isrecursive() broken.Tim Peters2001-05-141-0/+1
|
* Add support for Windows using "mbcs" as the default Unicode encoding when ↵Mark Hammond2001-05-131-0/+2
| | | | dealing with the file system. As discussed on python-dev and in patch 410465.
* Get rid of the superstitious "~" in dict hashing's "i = (~hash) & mask".Tim Peters2001-05-132-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The comment following used to say: /* We use ~hash instead of hash, as degenerate hash functions, such as for ints <sigh>, can have lots of leading zeros. It's not really a performance risk, but better safe than sorry. 12-Dec-00 tim: so ~hash produces lots of leading ones instead -- what's the gain? */ That is, there was never a good reason for doing it. And to the contrary, as explained on Python-Dev last December, it tended to make the *sum* (i + incr) & mask (which is the first table index examined in case of collison) the same "too often" across distinct hashes. Changing to the simpler "i = hash & mask" reduced the number of string-dict collisions (== # number of times we go around the lookup for-loop) from about 6 million to 5 million during a full run of the test suite (these are approximate because the test suite does some random stuff from run to run). The number of collisions in non-string dicts also decreased, but not as dramatically. Note that this may, for a given dict, change the order (wrt previous releases) of entries exposed by .keys(), .values() and .items(). A number of std tests suffered bogus failures as a result. For dicts keyed by small ints, or (less so) by characters, the order is much more likely to be in increasing order of key now; e.g., >>> d = {} >>> for i in range(10): ... d[i] = i ... >>> d {0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9} >>> Unfortunately. people may latch on to that in small examples and draw a bogus conclusion. test_support.py Moved test_extcall's sortdict() into test_support, made it stronger, and imported sortdict into other std tests that needed it. test_unicode.py Excluced cp875 from the "roundtrip over range(128)" test, because cp875 doesn't have a well-defined inverse for unicode("?", "cp875"). See Python-Dev for excruciating details. Cookie.py Chaged various output functions to sort dicts before building strings from them. test_extcall Fiddled the expected-result file. This remains sensitive to native dict ordering, because, e.g., if there are multiple errors in a keyword-arg dict (and test_extcall sets up many cases like that), the specific error Python complains about first depends on native dict ordering.
* SF bug #422121 Insecurities in dict comparison.Tim Peters2001-05-101-0/+1
| | | | | | | Fixed a half dozen ways in which general dict comparison could crash Python (even cause Win98SE to reboot) in the presence of kay and/or value comparison routines that mutate the dict during dict comparison. Bugfix candidate.
* Trivial tests of urllib2 for recent SF bugJeremy Hylton2001-05-091-0/+1
|
* SF patch 419176 from MvL; fixed bug 418977Jeremy Hylton2001-05-081-0/+1
| | | | Two errors in dict_to_map() helper used by PyFrame_LocalsToFast().
* Generalize tuple() to work nicely with iterators.Tim Peters2001-05-051-2/+2
| | | | | | | | | | | | | | | | | | | | | NEEDS DOC CHANGES. This one surprised me! While I expected tuple() to be a no-brainer, turns out it's actually dripping with consequences: 1. It will *allow* the popular PySequence_Fast() to work with any iterable object (code for that not yet checked in, but should be trivial). 2. It caused two std tests to fail. This because some places used PyTuple_Sequence() (the C spelling of tuple()) as an indirect way to test whether something *is* a sequence. But tuple() code only looked for the existence of sq->item to determine that, and e.g. an instance passed that test whether or not it supported the other operations tuple() needed (e.g., __len__). So some things the tests *expected* to fail with an AttributeError now fail with a TypeError instead. This looks like an improvement to me; e.g., test_coercion used to produce 559 TypeErrors and 2 AttributeErrors, and now they're all TypeErrors. The error details are more informative too, because the places calling this were *looking* for TypeErrors in order to replace the generic tuple() "not a sequence" msg with their own more specific text, and AttributeErrors snuck by that.
* Fix 2.1 nested scopes crash reported by Evan SimpsonJeremy Hylton2001-04-271-0/+1
| | | | | | | | The new test case demonstrates the bug. Be more careful in symtable_resolve_free() to add a var to cells or frees only if it won't be added under some other rule. XXX Add new assertion that will catch this bug.
* Update test to accomodate the change to the namespace_separator parameterFred Drake2001-04-251-3/+9
| | | | | | | of ParserCreate(). Added assignment tests for the ordered_attributes and specified_attributes values, similar to the checks for the returns_unicode attribute.
* Add test suite for iterators.Guido van Rossum2001-04-211-0/+1
|
* Fix compileall.py so that it fails on SyntaxErrorsJeremy Hylton2001-04-181-5/+5
| | | | | | | | | | | | | | | | | | | | | The changes cause compilation failures in any file in the Python installation lib directory to cause the install to fail. It looks like compileall.py intended to behave this way, but a change to py_compile.py and a separate bug defeated it. Fixes SF bug #412436 This change affects the test suite, which contains several files that contain intentional errors. The solution is to extend compileall.py with the ability to skip compilation of selected files. In the test suite, rename nocaret.py and test_future[3..7].py to start with badsyntax_nocaret.py and badsyntax_future[3..7].py. Update the makefile to skip compilation of these files. Update the tests to use the name names for imports. NB compileall.py is changed so that compile_dir() returns success only if all recursive calls to compile_dir() also check success.
* Add test for SF bug #405427Jeremy Hylton2001-04-131-0/+5
|
* Update to reflect new tokenize_test.pyJeremy Hylton2001-04-131-8/+8
|