Skip to content

Instantly share code, notes, and snippets.

@hpk42
Created November 8, 2012 21:50
Show Gist options
  • Save hpk42/4041914 to your computer and use it in GitHub Desktop.
Save hpk42/4041914 to your computer and use it in GitHub Desktop.
import pytest
class DriverPerSession():
pass
@pytest.fixture(scope="session")
def driver():
return DriverPerSession()
@pytest.fixture(scope="function")
def instdriver(request, driver):
request.instance.driver = driver
# plus any extra setup stuff you want to do
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment