Skip to content

Instantly share code, notes, and snippets.

@tjkhara
Created October 18, 2020 16:20
Show Gist options
  • Select an option

  • Save tjkhara/7efb2a8f77e4d39717928c9d1f238425 to your computer and use it in GitHub Desktop.

Select an option

Save tjkhara/7efb2a8f77e4d39717928c9d1f238425 to your computer and use it in GitHub Desktop.
Fixture file 1
import pytest
@pytest.fixture()
def setup():
print("\nSetup")
def test1(setup):
print("Executing test 1")
assert True
@pytest.mark.usefixtures("setup")
def test2():
print("Executing test 2")
assert True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment