The value_re argument for ExpectedException only fits some situations

Bug #791889 reported by Gavin Panella
6
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.

Tags: matchers

Related branches

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
Jonathan Lange (jml)
tags: added: matchers
Jonathan Lange (jml)
Changed in testtools:
status: Triaged → In Progress
assignee: nobody → Jonathan Lange (jml)
Jonathan Lange (jml)
Changed in testtools:
status: In Progress → Fix Committed
milestone: none → next
Revision history for this message
Jonathan Lange (jml) wrote :

Oops. I thought this was a typo for MatchesException, but actually the ExpectedException has not been fixed. Sorry.

Changed in testtools:
status: Fix Committed → Triaged
Jonathan Lange (jml)
Changed in testtools:
status: Triaged → In Progress
Jonathan Lange (jml)
Changed in testtools:
status: In Progress → Fix Committed
Jonathan Lange (jml)
Changed in testtools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.