Use copy instead of deepcopy

Deepcopy should not be used (see #7672).
Merge pull request #7674 from certik/deepcopy

Use copy instead of deepcopy
add unchanged function to pytest
move NS to pytest
check that all obj have __eq__ method
use the unchanged function in test suites

Some tests were modified to test what was more likely intended.

Some tests were marked with a skip to indicate that there is no
way to use the unchanged function to test that line because the
object doesn't support the func method.
add check for foo == foo tests in suite

If there is an inline comment at the end of such a test, the
test will not be flagged, e.g.

assert foo == foo  # quality: SKIP