hopefully fixed Python tests
Merge pull request #3014 from vpisarev:fix_python_tests