summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* SF bug #444510: int() should guarantee truncation.Tim Peters2001-07-261-0/+13
| | | | It's guaranteed now, assuming the platform modf() works correctly.
* Fix for bug #444493: u'\U00010001' segfaults with current CVS onMarc-André Lemburg2001-07-251-1/+2
| | | | wide builds.
* Make this test work under Windows as well.Fred Drake2001-07-231-2/+5
|
* Test for the "glob" module, contributed by Nick Mathewson.Fred Drake2001-07-231-0/+110
| | | | | Heavily modified so this doesn't break on Windows. This closes SF patch #441175.
* Whitespace normalization.Tim Peters2001-07-231-4/+3
| | | | Note: This test fails on Windows. Don't know why yet.
* Tests for the "commands" module, contributed by Nick Mathewson.Fred Drake2001-07-231-0/+45
| | | | This closes SF patch #440291.
* New tests by Nick Mathewson, for the fpformat module.Fred Drake2001-07-231-0/+67
| | | | This closes SF patch #440290.
* On WIndows, skip the part of test_dircache that can't work on Windows.Tim Peters2001-07-211-9/+15
|
* Whitespace normalization, plus:Tim Peters2001-07-213-13/+13
| | | | | | + test_quopri.py relied on significant trailing spaces. Fixed. + test_dircache.py (still) doesn't work on Windows (directory mtime on Windows doesn't work like it does on Unix).
* Use string.ascii_letters instead of string.letters (SF bug #226706).Fred Drake2001-07-201-1/+1
|
* Make the unicode-escape and the UTF-16 codecs handle surrogatesMarc-André Lemburg2001-07-201-0/+8
| | | | | | | | correctly and thus roundtrip-safe. Some minor cleanups of the code. Added tests for the roundtrip-safety.
* Regression test for the dircache module, contributed by Nick Mathewson.Fred Drake2001-07-191-0/+62
| | | | | Modified by Fred Drake. This closes SF patch #440827.
* Test for the repr module, contributed by Nick Mathewson.Fred Drake2001-07-191-0/+108
| | | | This closes SF patch #440826.
* Add some test cases for ntpath.join().Tim Peters2001-07-191-3/+19
|
* Cosmetic: break the long lines in test_ntpath.py, and get rid of itsTim Peters2001-07-192-9/+14
| | | | expected-output file.
* Added function xml.sax.saxutils.quoteattr().Fred Drake2001-07-192-2/+25
| | | | This closes SF bug #440351. It should not be moved to Python 2.1.1.
* Remove a couple of lines from the test that proved not to be portable toFred Drake2001-07-171-2/+0
| | | | all platforms that offer tempnam().
* Start of a test suite for the "os" module -- this only tests the temporaryFred Drake2001-07-171-0/+60
| | | | | file management functions that have just been made available on more platforms.
* Use the "st" versions of the "ast" calls in the parser module -- there isFred Drake2001-07-171-2/+2
| | | | no reason to pretend the syntax trees we're dealing with are abstract.
* Added tests for the new yield support in the parser module.Fred Drake2001-07-171-1/+132
| | | | (Should be merged with descr branch.)
* This has never worked on Windows. Now it does. If it breaks on Unix now,Tim Peters2001-07-161-1/+7
| | | | great, it's your turn to watch it fail for months <0.9 wink>.
* test_basic(): Add a test for "person@dom.ain (User J. Person)" whichBarry Warsaw2001-07-161-0/+12
| | | | | | | | was already correctly parsed (contrary to a comment in Mailman). test_rfc2822_phrases(): RFC 2822 now requires that we allow `.' in phrases, which means we must accept dots in unquoted realname parts. Add a test to check the change in rfc822.py 1.58.
* Add a unit test for sgmllib (needs work, but has already caught problems).Fred Drake2001-07-161-0/+243
| | | | Based on the test for the HTMLParser module.
* Give more useful information about a failing PyUnit-style test.Fred Drake2001-07-161-2/+11
|
* Remove a duplicate test.Fred Drake2001-07-161-1/+0
|
* Part way to allowing "from __future__ import generators" to communicateTim Peters2001-07-161-0/+2
| | | | | | | | | | that info to code dynamically compiled *by* code compiled with generators enabled. Doesn't yet work because there's still no way to tell the parser that "yield" is OK (unlike nested_scopes, the parser has its fingers in this too). Replaced PyEval_GetNestedScopes by a more-general PyEval_MergeCompilerFlags. Perhaps I should not have? I doubted it was *intended* to be part of the public API, so just did.
* Should raise TestSkipped, not ImportError, when deciding to skip theGuido van Rossum2001-07-131-2/+2
| | | | test.
* Having fun on my own time: quicker flat_conjoin; Knights Tour solverTim Peters2001-07-131-113/+123
| | | | simplified and generalized to rectangular boards.
* Remove the last remnants of the hacks to worm around leaks.Tim Peters2001-07-121-12/+3
|
* Repair flawed example.Tim Peters2001-07-121-1/+1
|
* Remove now-unnecessary "from __future__ import nested_scopes" stmts.Tim Peters2001-07-122-10/+6
|
* Remove reference cycle breaking code. The GC now takes care of it.Neil Schemenauer2001-07-121-7/+1
|
* Test GC of frame objects.Neil Schemenauer2001-07-121-0/+11
|
* Make the test pass now that 10**-15 returns a float instead of raisingGuido van Rossum2001-07-121-3/+1
| | | | an exception.
* SF patch #440170: Tests for fileinput module.Tim Peters2001-07-112-1/+159
| | | | | New test_fileinput.py from Nick Mathewson, fiddled to use TESTFN and sundry style nits.
* SF patch #440144: Tests and minor bugfix for uu module.Tim Peters2001-07-112-1/+124
| | | | | New test_uu.py from Nick Mathewson, fiddled to work on Windows too. Somebody should check that it still works on non-Windows boxes, though!
* Ported to Windows:Guido van Rossum2001-07-101-5/+6
| | | | | | - Set the host to "localhost" instead of "". - Skip the AF_UNIX tests when socket.AF_UNIX is not defined.
* A test suite for SocketServer.py that exposes the various bugs justGuido van Rossum2001-07-101-0/+161
| | | | | | | | | fixed. Regrettably, this must be run manually -- somehow the I/O redirection of the regression test breaks the test. When run under the regression test, this raises ImportError with a warning to that effect. Bugfix candidate!
* When reading a continuation line, make sure we still use the transformedFred Drake2001-07-061-0/+7
| | | | | | | name when filling in the internal data structures, otherwise we incorrectly raise a KeyError. This fixes SF bug #432369.
* Rip out tests for xrange() features no longer supported.Guido van Rossum2001-07-051-14/+0
|
* Added a non-recursive implementation of conjoin(), and a Knight's Tourunknown2001-07-041-2/+291
| | | | | | | | | | | | solver. In conjunction, they easily found a tour of a 200x200 board: that's 200**2 == 40,000 levels of backtracking. Explicitly resumable generators allow that to be coded as easily as a recursive solver (easier, actually, because different levels can use level-customized algorithms without pain), but without blowing the stack. Indeed, I've never written an exhaustive Tour solver in any language before that can handle boards so large ("exhaustive" == guaranteed to find a solution if one exists, as opposed to probabilistic heuristic approaches; of course, the age of the universe may be a blip in the time needed!).
* reapplied darryl gallion's minimizing repeat fix. I'm still not 100%Fredrik Lundh2001-07-022-1/+3
| | | | | sure about this one, but test #133283 now works even with the fix in place, and so does the test suite. we'll see what comes up...
* A clever union-find implementation from c.l.py, due to David Eppstein.Tim Peters2001-07-021-0/+77
| | | | | This is another one that leaks memory without an explict clear! Time to bite this bullet.
* Derive an industrial-strength conjoin() via cross-recursion loop unrolling,Tim Peters2001-06-301-9/+83
| | | | and fiddle the conjoin tests to exercise all the new possible paths.
* Added a simple but general backtracking generator (conjoin), and a coupleTim Peters2001-06-291-1/+162
| | | | | | | | | examples of use. These poke stuff not specifically targeted before, incl. recursive local generators relying on nested scopes, ditto but also inside class methods and rebinding instance vars, and anonymous partially-evaluated generators (the N-Queens solver creates a different column-generator for each row -- AFAIK this is my invention, and it's really pretty <wink>). No problems, not even a new leak.
* Another "if 0:" hack, this time to complain about otherwise invisibleTim Peters2001-06-281-0/+33
| | | | | | "return expr" instances in generators (which latter may be generators due to otherwise invisible "yield" stmts hiding in "if 0" blocks). This was fun the first time, but this has gotten truly ugly now.
* This no longer leaks memory when run in an infinite loop. However,Tim Peters2001-06-271-81/+58
| | | | | | | | | | | | | | | | | | | | | that required explicitly calling LazyList.clear() in the two tests that use LazyList (I added a LazyList Fibonacci generator too). A real bitch: the extremely inefficient first version of the 2-3-5 test *looked* like a slow leak on Win98SE, but it wasn't "really": it generated so many results that the heap grew over 4Mb (tons of frames! the number of frames grows exponentially in that test). Then Win98SE malloc() starts fragmenting address space allocating more and more heaps, and the visible memory use grew very slowly while the disk was thrashing like mad. Printing fewer results (i.e., keeping the heap burden under 4Mb) made that illusion vanish. Looks like there's no hope for plugging the LazyList leaks automatically short of adding frameobjects and genobjects to gc. OTOH, they're very easy to break by hand, and they're the only *kind* of plausibly realistic leaks I've been able to provoke. Dilemma.
* Encode surrogates in UTF-8 even for a wide Py_UNICODE.Martin v. Löwis2001-06-271-2/+2
| | | | | | | Implement sys.maxunicode. Explicitly wrap around upper/lower computations for wide Py_UNICODE. When decoding large characters with UTF-8, represent expected test results using the \U notation.
* gen_getattr: make the gi_running and gi_frame members discoverable (butTim Peters2001-06-261-2/+22
| | | | not writable -- too dangerous!) from Python code.
* Add a bunch of tests for extended dict.update() where the argument isBarry Warsaw2001-06-261-0/+70
| | | | | a non-dictionary mapping object. Include tests for several expected failure modes.