title: pytest scope function not creating 2 instances of browser
body: <p>I am trying to run 2 tests in parallel using <code>xdist</code> so before that I tried to make each test independent.</p>
  
  <p>This is where I'm setting up browser.</p>
  
  <pre><code>@pytest.fixture(scope="function")
  def moduleSetup(request):
      driver = webdriver.Firefox()
      def fin():
          driver.close()
      request.addfinalizer(fin)
      return driver
  </code></pre>
  
  <p>And here are 2 tests I'm running</p>
  
  <pre><code>def test_1(moduleSetup):
      print moduleSetup
      moduleSetup.get('http://www.foo.com')
      time.sleep(5)
  
  def test_2(moduleSetup):
      print moduleSetup
      moduleSetup.get('www.bar.com')
      time.sleep(5)
  </code></pre>
  
  <p>But when I run tests I get </p>
  
  <pre><code>&lt;selenium.webdriver.firefox.webdriver.WebDriver (session="5aae6a2d-6940-1c47-8c21-8403f84a2acb")&gt;
  ...
  .&lt;selenium.webdriver.firefox.webdriver.WebDriver (session="5aae6a2d-6940-1c47-8c21-8403f84a2acb")&gt;
  </code></pre>
  
  <p>As you can see it is using same browser instance. I thought if I set <code>scope</code> as <code>function</code> it will create 2 browser instances? </p>
  
  <p>If above works end goal is run tests in parallel like maybe using <code>py.test -d --tx 3*popen//python=python2.7 test.py -s</code>? So it will launch 2 browsers simultaneously. </p>