Guessing this is something to do with STDOUT/STDERR redirection, but the console output is not displayed when running
#!/usr/bin/env python
import subprocess
subprocess.check_output('mocha-phantomjs static/js/tests/headless.html'.split())
The same command in the terminal prints out all the test output