The value_re argument for ExpectedException only fits some situations
Bug #791889 reported by
Gavin Panella
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
testtools |
Fix Released
|
Wishlist
|
Jonathan Lange |
Bug Description
It would be nice to assume a default of '.*' (e.g., any exception of that type), and to permit matchers rather than just regexes.
For compatibility, a str/unicode argument could automatically create a regular expression matcher against the exception instance.
Related branches
lp:~jml/testtools/matches-exception-791889
- Robert Collins: Approve
-
Diff: 132 lines (+43/-15)3 files modifiedNEWS (+6/-0)
testtools/matchers.py (+11/-11)
testtools/tests/test_matchers.py (+26/-4)
lp:~jml/testtools/expected-exception-791889
- testtools committers: Pending requested
- Diff: 0 lines
Changed in testtools: | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
summary: |
- The value_re argument for ExpectedException should be optional, and be a - matcher instead + The value_re argument for ExpectedException only fits some situations |
description: | updated |
tags: | added: matchers |
Changed in testtools: | |
status: | Triaged → In Progress |
assignee: | nobody → Jonathan Lange (jml) |
Changed in testtools: | |
status: | In Progress → Fix Committed |
milestone: | none → next |
Changed in testtools: | |
status: | Triaged → In Progress |
Changed in testtools: | |
status: | In Progress → Fix Committed |
Changed in testtools: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Oops. I thought this was a typo for MatchesException, but actually the ExpectedException has not been fixed. Sorry.