tests: env_test: ProcessBase -> run_python

Extracted inline code to permanent files
Python3 compatibility of test files