summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_contextlib.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix contextlib not copying function attributesPhillip J. Eby2006-03-281-0/+15
|
* Fix a problem with @contextmanager not detecting a broken generatorPhillip J. Eby2006-03-251-0/+22
| | | | | | that yields after a throw(). Make @contextmanager not reraise exceptions, but return a false value in that case instead. Add test cases for both behaviors.
* 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.
* Updates to the with-statement:Guido van Rossum2006-02-281-0/+240
- 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.