title: pytest session not ending after completing all tests
body: <p>I am trying to integrate pytests into my Jenkins project, but the Jenkins job is not able to finish because the test session for pytest is not ending. </p>
  
  <p>Here is the simplest example I can come up with: </p>
  
  <p>Python Test: </p>
  
  <pre><code>import pytest
  import sys, time
  sys.path.append('../../bindings/python')
  
  class TestControl():
      def test_sanity_check(self):
          """
          Basic Test
          """
          assert (True)
  </code></pre>
  
  <p>Console Command &amp; Output: </p>
  
  <pre><code> python git:(ed25b33) ✗ sudo nano test_control.py 
  ➜  python git:(ed25b33) ✗ sudo python3 -m pytest -s test_control.py::TestControl::test_sanity_check
  =============================================================================================================================== test session starts ===============================================================================================================================
  platform linux -- Python 3.4.3, pytest-3.3.2, py-1.5.2, pluggy-0.6.0
  rootdir: /var/lib/jenkins/workspace/examples/python, inifile:
  collected 1 item                                                                                                                                                                                                                                                                  
  
  test_control.py .                                                                                                                                                                                                                                                           [100%]
  
  ============================================================================================================================ 1 passed in 0.67 seconds =============================================================================================================================
  </code></pre>
  
  <p>The test shows 100% completed, but for some reason is not terminating the session. I tried adding a sys.exit() inside the script but it results in an error. I just need the test to free up the console so my Jenkins work can finish.</p>