Created
September 2, 2022 12:33
-
-
Save masiarek/4b99ad430f0ae4d69cb179ade8c63432 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
@pytest.fixture(autouse=True, scope="module") | |
def fix_module(): | |
print("\nFix module setup") | |
yield | |
print("\nFix module teardown") | |
@pytest.fixture(autouse=True, scope="function") | |
def fix_function(): | |
print("\nFix function setup") | |
yield | |
print("\nFix function teardown") | |
@pytest.fixture() | |
def blue(): | |
print("\nFix blue setup") | |
yield | |
print("\nFix blue teardown") | |
@pytest.fixture() | |
def green(): | |
print("\nFix green setup") | |
yield | |
print("\nFix green teardown") | |
def test_one(blue, green): | |
print("Test one") | |
def test_two(green,blue): | |
print("Test two") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why am I not getting the expected messages “setup” and “teardown”?