Fix tests for copy=False
Fix exception message checking for Python 2