[issue20544] Use specific asserts in operator tests
Raymond Hettinger
report at bugs.python.org
Sat May 3 06:59:56 CEST 2014
Raymond Hettinger added the comment:
While this looks harmless, I seriously question whether it is an improvement.
For example, how is this any better?
- self.assertTrue(operator.setitem(a, 0, 2) is None)
+ self.assertIsNone(operator.setitem(a, 0, 2))
This error message for the first is already perfectly clear.
I don't see anything that warrants the code churn.
Also remember that changing tests is hazardous.
We don't have tests for the tests. So, if a test
gets damaged, we won't know about it. The particular
patch seems fine, but the whole exercise of going through
the test suite and altering the tests is a dubious. The
odds of us getting ANY value out of this is vanishingly small.
----------
nosy: +rhettinger
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20544>
_______________________________________
More information about the Python-bugs-list
mailing list