Created
October 18, 2020 16:20
-
-
Save tjkhara/7efb2a8f77e4d39717928c9d1f238425 to your computer and use it in GitHub Desktop.
Fixture file 1
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() | |
| 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