-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
type: questiongeneral question, might be closed after 2 weeks of inactivitygeneral question, might be closed after 2 weeks of inactivity
Description
In my example:
@pytest.fixture
def global_var():
pytest.global_variable_1 = 100
def test_1(global_var):
pytest.global_variable_1 +=1
print(pytest.global_variable_1)
def test_2(global_var):
pytest.global_variable_1 +=1
print(pytest.global_variable_1)
def test_3(global_var):
pytest.global_variable_1 +=1
print(pytest.global_variable_1)
Global variable pytest.global_variable works only in test_1. output:
101
101
101
What do I wrong in?
Metadata
Metadata
Assignees
Labels
type: questiongeneral question, might be closed after 2 weeks of inactivitygeneral question, might be closed after 2 weeks of inactivity