Thanks for the great plugin!
I noticed the following:
Example 1:
import requests
def test():
requests.get("http://httpbin.org/status/200")
This will raise SocketBlockedError, as expected.
Example 2:
import pytest
import requests
@pytest.fixture # scope == "function" by default
def getit():
requests.get("http://httpbin.org/status/200")
def test(getit):
pass
This will also raise the SocketBlockedError. Also as expected.
Example 3:
import pytest
import requests
@pytest.fixture(scope="module") # <== Notice the different scope!
def getit():
requests.get("http://httpbin.org/status/200")
def test(getit):
pass
This will pass. No exception.
To me, this was unexpected and lead to some debugging headaches.
Is this intended behavior or a bug? Is there a way to make the plugin also prevent cases such as this one?
Thanks for the great plugin!
I noticed the following:
Example 1:
This will raise
SocketBlockedError, as expected.Example 2:
This will also raise the
SocketBlockedError. Also as expected.Example 3:
This will pass. No exception.
To me, this was unexpected and lead to some debugging headaches.
Is this intended behavior or a bug? Is there a way to make the plugin also prevent cases such as this one?