Closed
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?