testtools-dev team mailing list archive
-
testtools-dev team
-
Mailing list archive
-
Message #00292
Re: [Merge] lp:~gz/testtools/raises_regressions_675327 into lp:testtools
> > I explicitly didn't do this because class names are not unique, and
> > thats bad for debuggability.
>
> Well, reprs aren't unique either, they're whatever gets returned from the
> __repr__ method. Is it socket.error etc. that you're concerned about? Would
> including the module name (if it's not "exceptions" or "builtins") work for
> you?
Something I neglected to mention, I wrote it without the module name because that's what the instance repr was already doing anyway:
>>> import socket
>>> from testtools.matchers import MatchesException
>>> print MatchesException(socket.error)
MatchesException(<class 'socket.error'>)
>>> print MatchesException(socket.error("fish"))
MatchesException(error('fish',))
So reverting how the class is displayed without also doing something about the instance would be weird.
--
https://code.launchpad.net/~gz/testtools/raises_regressions_675327/+merge/41342
Your team testtools developers is requested to review the proposed merge of lp:~gz/testtools/raises_regressions_675327 into lp:testtools.
Follow ups
References