Fix #10466 and get TestPythonImporter working again.
Merge pull request #864 from mtbc/trac-10466

Fix #10466 and get TestPythonImporter working again.