I've taken your branch and:
* Update copyright years in:
* testcase.py
* LICENSE
* __init__.py
* Update copyright years in LICENSE
* Added to NEWS
* Added Aaron to contributor list in README
* Beefed up docstring
* Re-exported from testcase/__init__.py (added to __all__)
* Added to __all__ in testcase.py
* Updated MatchesException to also take an optional regex
* Updated for-test-authors.rst to describe ExpectedException
I also tried out Rob's suggestion of using MatchesException. However, the re-raise logic of the context manager, plus the way that context managers can get None for exc_type means that there is very little code re-use, so I've left things pretty much the way you wrote them.
Thanks Aaron.
I've taken your branch and: __init_ _.py (added to __all__) authors. rst to describe ExpectedException
* Update copyright years in:
* testcase.py
* LICENSE
* __init__.py
* Update copyright years in LICENSE
* Added to NEWS
* Added Aaron to contributor list in README
* Beefed up docstring
* Re-exported from testcase/
* Added to __all__ in testcase.py
* Updated MatchesException to also take an optional regex
* Updated for-test-
I also tried out Rob's suggestion of using MatchesException. However, the re-raise logic of the context manager, plus the way that context managers can get None for exc_type means that there is very little code re-use, so I've left things pretty much the way you wrote them.
See lp:~jml/testtools/expected-exception, or trunk rsn.