Fixing failed unittest and making PEP compliant
Merge pull request #9565 from dmyerscough/develop

Fixing failed unittest and making PEP compliant