Use output pipes from subprocess.Popen for phantomjs tests