skip tests in test_pytest if running under pytest
Merge pull request #8122 from pbrady/fix_test_pytest

skip tests in test_pytest if running under pytest