TST: fix undefined variables hidden by unintended test method shadowing
Merge pull request #6184 from dsm054/fix-test-reshape

TST: fix test_reshape.py