summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* Um, I thought I'd already checked this in.Guido van Rossum2006-03-101-10/+22
| | | | | | | Anyway, this is the changes to the with-statement so that __exit__ must return a true value in order for a pending exception to be ignored. The PEP (343) is already updated.
* Update Unicode database to Unicode 4.1.Martin v. Löwis2006-03-091-2/+2
|
* Bug #1442874: handle "<!>", the empty SGML commentGeorg Brandl2006-03-091-1/+1
|
* Replace the trivial ctypes test (did only an import) with the real test suite.Thomas Heller2006-03-091-3/+11
|
* Try to be a bit more consistent on all platforms:Neal Norwitz2006-03-091-13/+2
| | | | | | | python . python < . both print a message, return non-zero and do not core dump.
* Whitespace normalization.Tim Peters2006-03-091-1/+1
|
* Trivial test for ctypes, more to comeThomas Heller2006-03-081-0/+4
|
* Patch #1434038: property() now uses the getter's docstring if there isGeorg Brandl2006-03-081-0/+12
| | | | | no "doc" argument given. This makes it possible to legitimately use property() as a decorator to produce a read-only property.
* _hotshot hotshot_profiler(): If write_header() returnedTim Peters2006-03-071-1/+4
| | | | | | | | | | | | | | | | an error code, this let `self` leak. This is a disaster on Windows, since `self` already points to a newly-opened file object, and it was impossible for Python code to close the thing since the only reference to it was in a blob of leaked C memory. test_hotshot test_bad_sys_path(): This new test provoked the C bug above. This test passed, but left an open "@test" file behind, which caused a massive cascade of bogus test failures in later, unrelated tests on Windows. Changed the test code to remove the @test file it leaves behind, which relies on the change above to close that file first.
* Checking in the code for PEP 357.Guido van Rossum2006-03-071-0/+0
| | | | | | This was mostly written by Travis Oliphant. I've inspected it all; Neal Norwitz and MvL have also looked at it (in an earlier incarnation).
* SF patch #1443865; gc.get_count() added and optional argument 'generation'Barry Warsaw2006-03-071-0/+18
| | | | | | added to gc.collect(). Updated docs, unit test, and NEWS entry. (Also, fixed a typo in NEWS.)
* Thanks to Coverity, these were all reported by their Prevent tool.Neal Norwitz2006-03-071-0/+13
| | | | | All of these (except _lsprof.c) should be backported. Particularly the hotshot change which validates sys.path. Can someone backport?
* If size is specified, try to read at least size characters.Walter Dörwald2006-03-061-5/+9
| | | | This is a alternative version of patch #1379332.
* Backout the last hack and add in this new one.Neal Norwitz2006-03-051-14/+8
| | | | | | | | | | | | | | | The failure definitely seems timing related. This change *seems* to work. Since the failure isn't doesn't occur consistently, it's hard to tell. Running these tests on Solaris in this order: test_urllibnet test_operator test_cgi \ test_isinstance test_future test_ast test_logging generally caused a failure (about 50% of the time) before the sleep. I couldn't provoke the failure with the sleep. This should really be cleaned up by using threading.Events or something so it is not timing dependent and doesn't hang forever on failure.
* Oops, urllib may or may not already be loaded.Neal Norwitz2006-03-041-1/+4
|
* Fix spurious test failure of test_socket_ssl when run in this order:Neal Norwitz2006-03-041-0/+4
| | | | | | | test_codecmaps_tw test_importhooks test_socket_ssl I don't completely understand the cause, but there's a lot of import magic going on and this is the smallest change which fixes the problem.
* Remove test for timing (already not built since commented out in setup.py).Neal Norwitz2006-03-041-21/+0
| | | | Add note to NEWS.
* I think the test_logging failure on Solaris is timing related. We don'tNeal Norwitz2006-03-031-5/+14
| | | | | | | want to wait forever if we don't receive the last message. But we also don't want the test to fail if we shutdown too quickly. I can't reliably reproduce this failure, so I'm kinda guessing this is the problem. We'll see if this band-aid helps.
* SF bug 1442442: LIST_APPEND optimization got lost in the AST merge.Neal Norwitz2006-03-031-21/+19
| | | | Add it back.
* Fix mismatch opening and closing quotes on a string.Brett Cannon2006-03-021-2/+1
|
* Fix failure of test_compiler.py when compiling test_contextlib.py.Guido van Rossum2006-03-021-1/+4
| | | | | | The culprit was an expression-less yield -- the first apparently in the standard library. I added a unit test for this. Also removed the hack to force compilation of test_with.py.
* Reformat the exception message by going through a list.Martin v. Löwis2006-03-011-1/+3
|
* Whitespace normalization.Tim Peters2006-03-011-1/+1
|
* Patch #1440601: Add col_offset attribute to AST nodes.Martin v. Löwis2006-03-011-42/+67
|
* Make failures in test cases print failing source file.Martin v. Löwis2006-03-011-1/+5
|
* Fix a bug in nested() - if one of the sub-context-managers swallows theGuido van Rossum2006-03-011-0/+54
| | | | exception, it should not be propagated up. With unit tests.
* Set svn:eol-style to native.Tim Peters2006-03-015-281/+281
|
* Fix parsing of exception_hierarchy.txt when a platform-specific exception isBrett Cannon2006-03-011-0/+1
| | | | specified. Hopefully this wll bring warming to Tim's Windows-loving heart.
* PEP 352 implementation. Creates a new base class, BaseException, which has anBrett Cannon2006-03-016-36/+235
| | | | | | | | | added message attribute compared to the previous version of Exception. It is also a new-style class, making all exceptions now new-style. KeyboardInterrupt and SystemExit inherit from BaseException directly. String exceptions now raise DeprecationWarning. Applies patch 1104669, and closes bugs 1012952 and 518846.
* 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
|