Created
June 19, 2019 20:18
-
-
Save BeyondEvil/e831435123f1c64009c7c25d8a49485d to your computer and use it in GitHub Desktop.
This file contains 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(scope="module") | |
def module_function(): | |
yield [1,2,3] | |
@pytest.fixture(scope="function") | |
def function_function(module_function): | |
return module_function | |
def test_something(function_function): | |
assert function_function == [1,2,3] | |
def test_something_else(function_function): | |
assert function_function == [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment