Closed
Description
When I do:
import requests
from pytest import fixture
@fixture
def my_fixture():
requests.get("https://google.com")
def test_abc(my_fixture, socket_enabled):
assert True
I expect socket_enabled
to completely enable calls to socket. However, this currently fails in the fixture.
Same if I do:
def r():
requests.get("https://google.com")
return True
def test_def(socket_enabled):
assert r()
And same if I use @pytest.mark.enable_socket
.
My setup.cfg:
[tool:pytest]
addopts = --allow-hosts=127.0.0.1