(ronan mwjackson) fixed platform tests that utilise sys._git

Merged Bitbucket Importer requested to merge bitbucket/merged-pr-602 into branch/py3.6

Created originally on Bitbucket by mwjackson (Matt Jackson)

Was already merged in Bitbucket before import, marked as merged by the import user

we are not reverting the entire migration to _git in the sys module (#27593), just patching the tests so they pass

Merge request reports