summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* Updates to the with-statement:Guido van Rossum2006-02-284-87/+310
| | | | | | | | | | | | | | | | - New semantics for __exit__() -- it must re-raise the exception if type is not None; the with-statement itself doesn't do this. (See the updated PEP for motivation.) - Added context managers to: - file - thread.LockType - threading.{Lock,RLock,Condition,Semaphore,BoundedSemaphore} - decimal.Context - Added contextlib.py, which defines @contextmanager, nested(), closing(). - Unit tests all around; bot no docs yet.
* Add a note about removing the file once the bug is fixedNeal Norwitz2006-02-281-1/+2
|
* Gave README a .txt extension.Tim Peters2006-02-281-0/+0
|
* from __future__ import with_statement addon for 'with', mostly written byThomas Wouters2006-02-281-0/+2
| | | | Neal.
* Add directory which contains known ref leaks. Some of these are likely to ↵Neal Norwitz2006-02-284-0/+52
| | | | be system dependent (like test_gestalt).
* Set EOL style to native.Tim Peters2006-02-284-811/+811
|
* Whitespace normalization.Tim Peters2006-02-285-816/+813
|
* Instead of printing the exception when you interrupt a test (Ctrl-C),Neal Norwitz2006-02-281-1/+9
| | | | print the status so far and suppress printing the exception (but still exit).
* Update commentsNeal Norwitz2006-02-281-1/+2
|
* Test case to cover subscription bug from SF 1333982Jeremy Hylton2006-02-282-0/+12
|
* SF patch #1438387, PEP 328: relative and absolute imports.Thomas Wouters2006-02-282-1/+41
| | | | | | | | | | | | | | | | | | | | | | | - IMPORT_NAME takes an extra argument from the stack: the relativeness of the import. Only passed to __import__ when it's not -1. - __import__() takes an optional 5th argument for the same thing; it __defaults to -1 (old semantics: try relative, then absolute) - 'from . import name' imports name (be it module or regular attribute) from the current module's *package*. Likewise, 'from .module import name' will import name from a sibling to the current module. - Importing from outside a package is not allowed; 'from . import sys' in a toplevel module will not work, nor will 'from .. import sys' in a (single-level) package. - 'from __future__ import absolute_import' will turn on the new semantics for import and from-import: imports will be absolute, except for from-import with dots. Includes tests for regular imports and importhooks, parser changes and a NEWS item, but no compiler-package changes or documentation changes.
* Update the compiler package to compile the with-statement.Guido van Rossum2006-02-281-1/+1
| | | | Jeremy, please review!
* PEP 343 -- the with-statement.Guido van Rossum2006-02-273-0/+635
| | | | | | | | | | | | | This was started by Mike Bland and completed by Guido (with help from Neal). This still needs a __future__ statement added; Thomas is working on Michael's patch for that aspect. There's a small amount of code cleanup and refactoring in ast.c, compile.c and ceval.c (I fixed the lltrace behavior when EXT_POP is used -- however I had to make lltrace a static global).
* Even though we don't currently use unicode or complex numbers in the test,Neal Norwitz2006-02-271-3/+3
| | | | | | be complete when when checking types. Yield cannot be tested outside a function, so add a comment to that effect.
* Don't filter out OverflowWarning; should be a test failure if it is raised byBrett Cannon2006-02-271-2/+1
| | | | the interpreter in 2.5 .
* PEP 308 implementation, including minor refdocs and some testcases. ItThomas Wouters2006-02-271-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | breaks the parser module, because it adds the if/else construct as well as two new grammar rules for backward compatibility. If no one else fixes parsermodule, I guess I'll go ahead and fix it later this week. The TeX code was checked with texcheck.py, but not rendered. There is actually a slight incompatibility: >>> (x for x in lambda:0) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: iteration over non-sequence changes into >>> (x for x in lambda: 0) File "<stdin>", line 1 (x for x in lambda: 0) ^ SyntaxError: invalid syntax Since there's no way the former version can be useful, it's probably a bugfix ;)
* Generate code to recursively copy an AST intoMartin v. Löwis2006-02-261-0/+179
| | | | a tree of Python objects. Expose this through compile().
* - Patch 1433928:Guido van Rossum2006-02-254-0/+250
| | | | | | | | - The copy module now "copies" function objects (as atomic objects). - dict.__getitem__ now looks for a __missing__ hook before raising KeyError. - Added a new type, defaultdict, to the collections module. This uses the new __missing__ hook behavior added to dict (see above).
* RFE #1436243: make integers in [0..256] preallocated.Georg Brandl2006-02-221-0/+4
|
* Add test for classmethod ./. keyword args.Georg Brandl2006-02-211-0/+8
|
* Suppress another deprecation warning in the tests.Tim Peters2006-02-211-1/+8
|
* Whitespace normalization.Tim Peters2006-02-201-1/+1
|
* Bug #1101233: fix test_fcntl on netbsd2 platform.Georg Brandl2006-02-201-1/+1
|
* Bug #1413790: zipfile now sanitizes absolute archive names that areGeorg Brandl2006-02-201-0/+10
| | | | not allowed by the specs.
* Repair new test failures on Windows due toTim Peters2006-02-191-4/+4
| | | | | implicit assumptions that there's no difference between text and binary modes.
* Fix the encodings package codec search function to only searchMarc-André Lemburg2006-02-191-2/+13
| | | | | | inside its own package. Fixes problem reported in patch #1433198. Add codec search function for codec test codec.
* Patch #1215184: FileInput now can be given an opening hook which canGeorg Brandl2006-02-191-1/+23
| | | | be used to control how files are opened.
* Patch #1212287: fileinput.input() now has a mode parameter forGeorg Brandl2006-02-191-1/+18
| | | | specifying the file mode input files should be opened with.
* Patch #1215184: fileinput now has a fileno() function for getting theGeorg Brandl2006-02-191-0/+16
| | | | current file number.
* Patch #1349274: gettext.install() now optionally installs additionalGeorg Brandl2006-02-191-0/+8
| | | | translation functions other than _() in the builtin namespace.
* Patch #1337756: fileinput now accepts Unicode filenames.Georg Brandl2006-02-191-0/+10
|
* test_gopher(): Squash another deprecationTim Peters2006-02-191-0/+5
| | | | warning about gopherlib.
* This fixes test _locale failing on macteagle (Mac OS 10.4 AFAIK).Neal Norwitz2006-02-191-3/+5
| | | | | | | | | Google for: eu_ES decimal point shows that BSD locales had the eu_ES decimal point as a single quote (') instead of a comma (,). This was seems to have been fixed 15 months ago, but it's not on our Mac and presumably others. So skip this broken locale.
* This should get test_timeout to pass when running on any python.org host. ↵Neal Norwitz2006-02-181-0/+5
| | | | Will backport
* Suppress new deprecation warnings when running theTim Peters2006-02-183-0/+15
| | | | | | | | | | | test suite. For urllib2, move the import of gopherlib into the only function that uses it: users (including the test suite) certainly shouldn't see a deprecation warning just because they import urllib2! If they actually use gopher_open(), fine, _then_ they should see a deprecation warning.
* Move test case for HTTP response dict to httplib.Georg Brandl2006-02-172-5/+5
|
* Merge ssize_t branch.Martin v. Löwis2006-02-151-1/+3
|
* New test code failed to close the file. This causedTim Peters2006-02-141-13/+12
| | | | | | | | | | test_file to fail on Windows in reality (can't delete a still-open file), but a new bare "except:" hid that test_file failed on Windows, and leaving behind the still-open TESTFN caused a cascade of bogus failures in later tests. So, close the file, and stop hiding failure to unlink.
* SF patch #1397960: When mixing file-iteration andThomas Wouters2006-02-121-1/+111
| | | | | | | readline/readlines/read/readinto, loudly break by raising ValueError, rather than silently deliver data out of order or hitting EOF prematurely. Probably not a bugfix candidate, even though it affects no 'working' code.
* Renamed _length_cue() to __length_hint__(). See:Armin Rigo2006-02-112-2/+6
| | | | http://mail.python.org/pipermail/python-dev/2006-February/060524.html
* Added lock acquisition/release around shared data structure manipulationVinay Sajip2006-02-091-19/+34
|
* Added the cProfile module.Armin Rigo2006-02-084-57/+327
| | | | | | | | | | | | | | | | | | | | | | | Based on lsprof (patch #1212837) by Brett Rosen and Ted Czotter. With further editing by Michael Hudson and myself. History in svn repo: http://codespeak.net/svn/user/arigo/hack/misc/lsprof * Module/_lsprof.c is the internal C module, Lib/cProfile.py a wrapper. * pstats.py updated to display cProfile's caller/callee timings if available. * setup.py and NEWS updated. * documentation updates in the profiler section: - explain the differences between the three profilers that we have now - profile and cProfile can use a unified documentation, like (c)Pickle - mention that hotshot is "for specialized usage" now - removed references to the "old profiler" that no longer exists * test updates: - extended test_profile to cover delicate cases like recursion - added tests for the caller/callee displays - added test_cProfile, performing the same tests for cProfile * TO-DO: - cProfile gives a nicer name to built-in, particularly built-in methods, which could be backported to profile. - not tested on Windows recently!
* Saved and restored logging._handlerList at the same time as saving/restoring ↵Vinay Sajip2006-02-071-0/+4
| | | | logging._handlers.
* Get test_logging to not hang when running under regrtest.py -R ::Neal Norwitz2006-02-051-4/+4
| | | | | | | | | | | | | | Not sure why/how _handlers/_handlerList is out of sync. This could indicate a deeper problem. In test_logging, the only absolutely necessary change to get working was tcpserver.abort = 1. But we don't want to wait infinitely to join the threads, so give a 2.0 second timeout. There doesn't appear to be a need for a local abort variable in serve_until_stopped, so just use the instance member. Note the problem is only on HEAD, not in 2.4.
* Patch #1407135, bug #1424041, make mmap.mmap(-1, length) work the sameNeal Norwitz2006-02-052-2/+13
| | | | | | | | | | | on both Unix (SVR4 and BSD) and Windows. Restores behaviour of passing -1 for anonymous memory on Unix. Use MAP_ANONYMOUS instead of _ANON since the latter is deprecated according to Linux (gentoo) man pages. Should we continue to allow mmap.mmap(0, length) to work on Windows? 0 is a valid fd. Will backport bugfix portions.
* Fix typoNeal Norwitz2006-02-041-1/+1
|
* Patch #1413711: Certain patterns of differences were making difflibGustavo Niemeyer2006-01-311-0/+9
| | | | | touch the recursion limit. The applied patch inlines the recursive __helper method in a non-recursive way.
* Whitespace normalization.Tim Peters2006-01-291-1/+1
|
* Try a number of ports, in case 9020 is already in use.Martin v. Löwis2006-01-291-3/+14
|
* Explicitly close the server socket.Martin v. Löwis2006-01-291-0/+2
|