The attached patch will bring Lib/copy.py to 100% test coverage.
A bug in "coverage" results in its only reporting 99% at the moment; see coverage issue #122 on bitbucket:
https://bitbucket.org/ned/coveragepy/issue/122/for-else-always-reports-missing-branch
This patch makes several minor improvements to "copy": when doing getattr lookups with a default of "None", it now uses an "is" comparison against None which is both faster and more correct; several special cases have been removed since Python 3 always has "CodeType" available; and an ancient obsolete test suite that had been appended to copy.py in ancient times has been removed. |