Changes by Ezio Melotti ezio.melo...@gmail.com:
--
components: +Tests
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10675
___
New submission from Jay Moorthi moor...@gmail.com:
It would be useful to have a new assert method in the unittest.TestCase class
that checks to see if a value has changed. I wrote a quick and dirty version
like so:
class MySpecialTestCase(unittest.TestCase):
@contextmanager
def
R. David Murray rdmur...@bitdance.com added the comment:
I think this is the kind of thing where you are *much* better off writing a
specialized assert method that exactly fits your use case. There are too many
variations on this theme, IMO, for it to make sense as an stdlib method.
Changes by Benjamin Peterson benja...@python.org:
--
status: pending - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10675
___
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
I concur with David Murray. Usually you care about the specific value changed
to, not whether it changed at all. The changed-by variant is even more
specialized and you're better of using assertEqual since you know what
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Thanks for submitting the idea though.
Perhaps, post it on the ASPN Cookbook
or on the newsgroup to see if others
are interested.
--
___
Python tracker rep...@bugs.python.org