title: Run py.test test in different process
body: <p>I'm trying to test tensorflow program. I'm setting up tensorflow session using parametrized py.test fixture:</p>
  
  <pre><code>@pytest.fixture(scope="session", params=configuration)
  def session(request):
      if request.param == 'tensorflow':
          return tf.Session()
      elif request.param == 'tensorflow-eager':
          tfe.enable_eager_execution()
          return tf.Session()
      elif ...
  </code></pre>
  
  <p>Tensorflow has global state, thus several test launches can pollute it. For example there is no way to disable eager execution after it has been enabled. Is there a way to instruct py.test to create a new process for each test? Or another way to configure environment for the test besides using parametrized fixture? Example usage:</p>
  
  <pre><code>@pytest.mark.parametrize("bias_type", ['variable', 'ndarray', 'list', 'tuple'])
  @pytest.mark.parametrize("kernel_type", ['variable', 'ndarray', 'list', 'tuple'])
  @pytest.mark.parametrize("input_type", ['variable', 'ndarray', 'list', 'tuple'])
  def test_convolution(session, input_type, kernel_type, bias_type):
      ...
  </code></pre>