title: Pytest fixture not able to quit the test after execution in python pytest
body: <p>I am using below fixture in conftest.py for open and close browser :
  conftest.py:</p>
  
  <pre><code>@pytest.fixture(scope='session')
  def browser():
      print("Setting up webdriver connection...")
      global driver
      if driver is None:
          profile = webdriver.FirefoxProfile()
          profile.accept_untrusted_certs = True
          profile.set_preference("network.proxy.type",1)
          driver = webdriver.Firefox(firefox_profile=profile)
          driver.maximize_window()
          yield driver
          driver.quit()
          print("Webdriver connection closed..")
  </code></pre>
  
  <p>In my Test Class I have below step test_login :</p>
  
  <pre><code>def test_login(self, browser):
          login_page = pagep.LoginPage(browser)
          login_page.login('hptest376@gmail.com', "test12345*")
          login_page.login('user', "pwd")
          assert "Sum" in browser.title
  </code></pre>
  
  <p>And after test_login I have one more test step in my Test Class:</p>
  
  <pre><code>def test_ppt(a):
      a=12
      print a
  </code></pre>
  
  <p>Issue : I am getting error in fixture  at driver.quit() and browser is not closing.</p>
  
  <p>If I remove the "test_ppt(a)" step after "test_login(self, browser)" then the test runs fine.</p>
  
  <p>Want to know what i need to update in my fixture "browser()" so that driver.quit() is executed.</p>