testtools-dev team mailing list archive
-
testtools-dev team
-
Mailing list archive
-
Message #00535
Re: [Merge] lp:~abentley/testtools/expected-exception into lp:testtools
Thanks Aaron.
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.
See lp:~jml/testtools/expected-exception, or trunk rsn.
--
https://code.launchpad.net/~abentley/testtools/expected-exception/+merge/46858
Your team testtools developers is subscribed to branch lp:testtools.
References