[issue11572] bring Lib/copy.py to 100% coverage
Brandon Craig Rhodes
report at bugs.python.org
Mon Mar 21 13:55:02 CET 2011
Brandon Craig Rhodes <brandon at rhodesmill.org> added the comment:
Nick Coghlan <report at bugs.python.org> writes:
> Regarding "__reduce__", other readers will have the same question Éric
> did, so that point should definitely go in a comment after the
> "__reduce_ex__" check.
I just sat down to review this issue, and, looking at test_copy3.patch,
isn't there already a comment next to each __reduce_ex__ check that
reminds the reader that object.__reduce_ex__ will itself call
__reduce__? Does the comment just need to be more elaborate or
something?
Finally, Éric wants me to replace this:
> self.assertTrue(issubclass(copy.Error, Exception))
with self.assertIsInstance(). But surely the question is not whether
copy.Error is an *instance* of Exception? They are both instances of
*type*, right? What I would need is something like assertIsSubclass or
assertInheritsFrom, neither of which exists.
So I think that test_copy3.patch already includes all of the valid
improvements on the table; if I'm missing one, just point it out and
I'll fix it!
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11572>
_______________________________________
More information about the Python-bugs-list
mailing list