title: Test output not visible in Jenkins build log
body: <p>I want to see stdout coming from a python test inside the jenkins build logs. I'm running pytest (==5.3.1) from within my Jenkins pipeline inside an sh script:</p>
  
  <pre><code>stage('unit tests') {            
       print "starting unit tests"
       sh script: """
           source env-test/bin/activate &amp;&amp; \
           python -m pytest -x -s src/test/test*.py
       """, returnStdout: true, returnStatus: true
  }
  </code></pre>
  
  <p>Note that I'm running my tests from with a virtual environment (env-test).
  Unfortunately, the Jenkins logs do not display output that I send from within my tests:</p>
  
  <pre><code>def test_it(self):
     print('\nhello world')
     self.assertTrue(True)
  </code></pre>
  
  <p>But it only shows the initial call:</p>
  
  <pre><code>+ python -m pytest -x -s src/test/testModel.py
  [Pipeline] }
  [Pipeline] // stage
  </code></pre>
  
  <p>Whereas my local pycharm ide and gitbash shows all output:</p>
  
  <pre><code>============================= test session starts =============================
  platform win32 -- Python 3.6.4, pytest-5.3.1, py-1.8.0, pluggy-0.13.1 --     C:\...\Anaconda3\python.exe
  cachedir: .pytest_cache
  rootdir: C:\...\src\test
  collecting ... collected 1 item
  
  testModel.py::TestModel::test_it
  PASSED                                  [100%]
  hello world
  
  ============================== 1 passed in 0.57s ==============================
  </code></pre>
  
  <p>The pytest docs are talking about <a href="https://docs.pytest.org/en/latest/capture.html#setting-capturing-methods-or-disabling-capturing" rel="nofollow noreferrer">Capturing of the stdout/stderr output</a>. So I tried to use the -s parameter in order to disable capturing but without success.</p>