Skip to content

Instantly share code, notes, and snippets.

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

  • Save tjkhara/136fe91d28ed24550a43c77922ec96cf to your computer and use it in GitHub Desktop.

Select an option

Save tjkhara/136fe91d28ed24550a43c77922ec96cf to your computer and use it in GitHub Desktop.
Autouse in fixture
import pytest
@pytest.fixture(autouse=True)
def setup():
print("\nSetup")
def test1():
print("Executing test 1")
assert True
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