summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* Some more test-size-estimate fixes: test_append and test_insert trigger aThomas Wouters2006-04-261-3/+7
| | | | list resize, which overallocates.
* Add tests for += and *= on strings, and fix the memory-use estimate for theThomas Wouters2006-04-261-3/+37
| | | | list.extend tests (they were estimating half the actual use.)
* Whitespace normalization.Tim Peters2006-04-262-922/+922
|
* The result of SF patch #1471578: big-memory tests for strings, lists andThomas Wouters2006-04-263-3/+1008
| | | | | | tuples. Lots to be added, still, but this will give big-memory people something to play with in 2.5 alpha 2, and hopefully get more people to write these tests.
* Fix this test on Solaris. There can be embedded \r, so don't just replaceNeal Norwitz2006-04-261-2/+2
| | | | the one at the end.
* Rev 45706 renamed stuff in contextlib.py, but didn't renameTim Peters2006-04-261-8/+8
| | | | | | | | | | | | | | uses of it in test_with.py. As a result, test_with has been skipped (due to failing imports) on all buildbot boxes since. Alas, that's not a test failure -- you have to pay attention to the 1 skip unexpected on PLATFORM: test_with kinds of output at the ends of test runs to notice that this got broken. It's likely that more renaming in test_with.py would be desirable.
* SF bug/patch #1433877: string parameter to ioctl not null terminatedThomas Wouters2006-04-251-8/+1
| | | | | | | The new char-array used in ioctl calls wasn't explicitly NUL-terminated; quite probably the cause for the test_pty failures on Solaris that we circumvented earlier. (I wasn't able to reproduce it with this patch, but it has been somewhat elusive to start with.)
* Move the PEP 343 documentation and implementation closer to theNick Coghlan2006-04-251-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | terminology in the alpha 1 documentation. - "context manager" reverts to its alpha 1 definition - the term "context specifier" goes away entirely - contextlib.GeneratorContextManager is renamed GeneratorContext There are still a number of changes relative to alpha 1: - the expression in the with statement is explicitly called the "context expression" in the language reference - the terms 'with statement context', 'context object' or 'with statement context' are used in several places instead of a bare 'context'. The aim of this is to avoid ambiguity in relation to the runtime context set up when the block is executed, and the context objects that already exist in various application domains (such as decimal.Context) - contextlib.contextmanager is renamed to contextfactory This best reflects the nature of the function resulting from the use of that decorator - decimal.ContextManager is renamed to WithStatementContext Simple dropping the 'Manager' part wasn't possible due to the fact that decimal.Context already exists and means something different. WithStatementContext is ugly but workable. A technically unrelated change snuck into this commit: contextlib.closing now avoids the overhead of creating a generator, since it's trivial to implement that particular context manager directly.
* Patch #1475231: add a new SKIP doctest option, thanks toTim Peters2006-04-251-0/+19
| | | | Edward Loper.
* Revert addition of setuptoolsPhillip J. Eby2006-04-241-16/+0
|
* Stop test_tcl's testLoadTk from leaking the Tk commands 'loadtk' registers.Thomas Wouters2006-04-241-0/+1
|
* 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
|