Created
October 18, 2020 16:22
-
-
Save tjkhara/136fe91d28ed24550a43c77922ec96cf to your computer and use it in GitHub Desktop.
Autouse in fixture
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) | |
| 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