summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* More reliable version of new command line tests that just checks the exit codesNick Coghlan2006-04-241-2/+37
|
* Back out new command line tests (broke buildbot)Nick Coghlan2006-04-241-55/+0
|
* Fix broken contextlib test from last checkin (I'd've sworn I tested that ↵Nick Coghlan2006-04-241-0/+2
| | | | before checking it in. . .)
* Fix contextlib.nested to cope with exit methods raising and handling exceptionsNick Coghlan2006-04-241-0/+23
|
* Add unit tests for the -m and -c command line switchesNick Coghlan2006-04-241-0/+55
|
* Updated the sqlite3 module to the external pysqlite 2.2.2 version.Gerhard Häring2006-04-231-2/+3
|
* Update optparse to Optik 1.5.1.Greg Ward2006-04-231-55/+145
|
* Remove $CJKCodecs$ RCS tags. The CJKCodecs isn't maintained outsideHye-Shik Chang2006-04-2211-11/+0
| | | | anymore.
* Whitespace normalization.Tim Peters2006-04-221-17/+17
|
* Add Gregory K. Johnson's revised version of mailbox.py (funded byAndrew M. Kuchling2006-04-221-14/+1658
| | | | | | | | | | | | | | | | | the 2005 Summer of Code). The revision adds a number of new mailbox classes that support adding and removing messages; these classes also support mailbox locking and default to using email.Message instead of rfc822.Message. The old mailbox classes are largely left alone for backward compatibility. The exception is the Maildir class, which was present in the old module and now inherits from the new classes. The Maildir class's interface is pretty simple, though, so I think it'll be compatible with existing code. (The change to the NEWS file also adds a missing word to a different news item, which unfortunately required rewrapping the line.)
* Make copy of test_mailbox.py. We'll still want to check the backwardAndrew M. Kuchling2006-04-221-0/+120
| | | | | | | | | compatibility classes in the new mailbox.py that I'll be committing in a few minutes. One change has been made: the tests use len(mbox) instead of len(mbox.boxes). The 'boxes' attribute was never documented and contains some internal state that seems unlikely to have been useful.
* SF bug #1473760 TempFile can hang on Windows.Tim Peters2006-04-212-1/+62
| | | | | | | | | | | | | | | | | | | | | | | | Python 2.4 changed ntpath.abspath to do an import inside the function. As a result, due to Python's import lock, anything calling abspath on Windows (directly, or indirectly like tempfile.TemporaryFile) hung when it was called from a thread spawned as a side effect of importing a module. This is a depressingly frequent problem, and deserves a more general fix. I'm settling for a micro-fix here because this specific one accounts for a report of Zope Corp's ZEO hanging on Windows, and it was an odd way to change abspath to begin with (ntpath needs a different implementation depending on whether we're actually running on Windows, and the _obvious_ way to arrange for that is not to bury a possibly-failing import _inside_ the function). Note that if/when other micro-fixes of this kind get made, the new Lib/test/threaded_import_hangers.py is a convenient place to add tests for them.
* Correct implementation and documentation of os.confstr. Add a simple testSkip Montanaro2006-04-201-0/+5
| | | | case. I've yet to figure out how to provoke a None return I can test.
* SF Patch #1062014: AF_UNIX sockets under Linux have a specialArmin Rigo2006-04-191-0/+28
| | | | abstract namespace that is now fully supported.
* A dictresize() attack. If oldtable == mp->ma_smalltable then pureArmin Rigo2006-04-181-0/+32
| | | | | Python code can mangle with mp->ma_smalltable while it is being walked over.
* add a very old crasher from the 2.1 -> 2.2 round of dictionary fixes.Michael W. Hudson2006-04-181-0/+47
|
* Whitespace normalizationNeal Norwitz2006-04-181-1/+1
|
* Initial import of setuptools, with integrated tests.Phillip J. Eby2006-04-181-0/+16
|
* test_pyclbr goes nuts when a module contains code to try importing a classPhillip J. Eby2006-04-181-0/+3
| | | | | | and provide a substitute if the import fails, because pyclbr sees the class definition. Changed to ignore such cases' base classes and methods, since they will not match.
* This patches fixes a number of byteorder problems in MacOSX specific code.Ronald Oussoren2006-04-171-2/+2
|
* Add a comment to explain why we are calling _cleanup()Neal Norwitz2006-04-171-0/+2
|
* Try to stop the test from leaking and yet still work on windowsNeal Norwitz2006-04-171-3/+2
|
* Get test to consistently show no leaksNeal Norwitz2006-04-171-1/+3
|
* Make test_timeout not fail on systems with no dots in their fqdn.Thomas Wouters2006-04-161-1/+1
|
* Make test_warnings play nice with regrtest -R:: now that regrtest doesn'tThomas Wouters2006-04-161-4/+4
| | | | | always reload the module (specifically, it doesn't reload if the module has a 'test_main'.)
* Specialcase 'xs4all' (.nl/.net/.com/whatever else we have) as well asThomas Wouters2006-04-161-1/+2
| | | | | | | 'python.org' when deciding what server to use for the timeout tests; getting tired of seeing the test fail on all my boxes ;P This'll still allow the test to fail for hosts in the XS4ALL network that don't have an 'xs4all' hostname, so maybe it should use a fallback scheme instead.
* This test no longer leaks, and test_generators sufficiently tests it toThomas Wouters2006-04-161-25/+0
| | | | prevent unreported regression.
* Add missing DECREF to PyErr_WriteUnraisable(). That function reportsThomas Wouters2006-04-152-21/+34
| | | | | | | | | | | exceptions that can't be raised any further, because (for instance) they occur in __del__ methods. The coroutine tests in test_generators was triggering this leak. Remove the leakers' testcase, and add a simpler testcase that explicitly tests this leak to test_generators. test_generators now no longer leaks at all, on my machine. This fix may also solve other leaks, but my full refleakhunting run is still busy, so who knows?
* Consolidate 'leak_test1' and 'refleaks_tests', since they both test for theThomas Wouters2006-04-151-17/+15
| | | | same kind of thing.
* Add missing PyObject_GC_Track call, causing *some* itertools.tee objects toThomas Wouters2006-04-151-17/+6
| | | | | | | | | not be tracked by GC. This fixes 254 of test_generators' refleaks on my machine, but I'm sure something else will make them come back :> Not adding a separate test for this kind of cycle, since the existing fib/m235 already test them in more extensive ways than any 'minimal' test has been able to manage.
* Changed comments to make sense now that the LazyList-basedTim Peters2006-04-151-4/+6
| | | | | | | | | | | | | | | | | examples no longer require any explicit closing to avoid leaking. That the tee-based examples still do is (I think) still a mystery. Part of the mystery is that gc.garbage remains empty: if it were the case that some generator in a trash cycle said it needed finalization, suppressing collection of that cycle, that generator _would_ show up in gc.garbage. So this is acting more like, e.g., some tp_traverse slot isn't visiting all the pointers it should (in which case the skipped pointer(s) would act like an external root, silently suppressing collection of everything reachable from it(them)).
* Fix SF#1470508: crash in generator cycle finalization. There were twoPhillip J. Eby2006-04-151-7/+0
| | | | | | | | | | | problems: first, PyGen_NeedsFinalizing() had an off-by-one bug that prevented it from ever saying a generator didn't need finalizing, and second, frame objects cleared themselves in a way that caused their owning generator to think they were still executable, causing a double deallocation of objects on the value stack if there was still a loop on the block stack. This revision also removes some unnecessary close() operations from test_generators that are now appropriately handled by the cycle collector.
* Whitespace normalization.Tim Peters2006-04-141-16/+16
|
* Add a BufferedIncrementalEncoder class that can be used for implementingWalter Dörwald2006-04-141-3/+70
| | | | | | | | | an incremental encoder that must retain part of the data between calls to the encode() method. Fix the incremental encoder and decoder for the IDNA encoding. This closes SF patch #1453235.
* Show case: reference cycles involving only the ob_type field are ratherArmin Rigo2006-04-141-0/+13
| | | | uncommon but possible. Inspired by SF bug 1469629.
* Call encode()/decode() with final==True as the last call in theWalter Dörwald2006-04-141-0/+4
| | | | incremental codec tests.
* Copy note from leakers README here too. We want to keep all test cases.Neal Norwitz2006-04-141-0/+5
|
* Restore test tee with some modifications.Neal Norwitz2006-04-141-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test case came from test_generators, not test_itertools. Ensure there's no cyclic garbage we are counting. This is weird because it leaks, then reaches a limit: python.exe -i test_tee.py >>> leak() 0 [26633 refs] >>> leak() 0 [26658 refs] >>> leak() 0 [26683 refs] >>> leak() 0 [26708 refs] >>> leak() 0 [26708 refs] >>> leak() 0 [26708 refs] >>> leak() 0
* Move the old test_generator_cycle.py which leaked but was removed into the testNeal Norwitz2006-04-141-0/+17
|
* Update notes to address cyclic garbage and what should happen when a test is ↵Neal Norwitz2006-04-141-0/+13
| | | | fixed.
* When using -R, lots of "*** DocTestRunner.merge:" nuisance messagesTim Peters2006-04-131-1/+3
| | | | | | | appear. Get rid of them by nuking doctest's default DocTestRunner instance as part of cleanup(). Also cleanup() before running the first test repetition (the test was run once before we get into the -R branch).
* Whitespace normalization.Tim Peters2006-04-131-1/+1
|
* Add a test for Py_ssize_t. Correct typo in getargs.c.Georg Brandl2006-04-131-1/+18
|
* test_compile can be really long if we are using -u compiler.Neal Norwitz2006-04-131-2/+11
| | | | | | | | | This may be causing the debian sparc buildbot to fail. Print a little message to let the user ^w buildbot know it's still thinking. We may want to adjust the time period which is currently 5 minutes. Will backport.
* Remove tests that no longer leak. There is still one leaking generator testNeal Norwitz2006-04-133-30/+19
|
* tty isn't supported on all boxes.Tim Peters2006-04-131-1/+6
|
* reverting r45321: Patch #860326: traceback.format_exception_only() nowAnthony Baxter2006-04-131-21/+0
| | | | | | | | prepends the exception's module name to non-builtin exceptions, like the interpreter itself does. broke a number of doctests. should be discussed before checking in (see discussion on python-dev).
* Patch #860326: traceback.format_exception_only() now prepends theGeorg Brandl2006-04-121-0/+21
| | | | | exception's module name to non-builtin exceptions, like the interpreter itself does.
* Fixes bug #1117761Gregory P. Smith2006-04-121-1/+1
| | | | | | | | | bsddb.*open() methods cachesize parameter wouldn't work (raised an internal bsddb.db exception when it was given). The set_cachesize call needed to be moved from the DB object to the DBEnv since the env was introduced to allow for threading. (will backport to 2.4)
* Closes bug #1149413Gregory P. Smith2006-04-121-1/+8
| | | | | | | Using None for a filename with the 'n' flag when calling bsddb.btopen would cause an error while checking if the file None existed. error not likely to be seen as anyone using None for a filename would likely use the 'c' flag in the first place.