__exit__ doesn't raise the exception (if exist)
ugatenio opened this issue · 2 comments
ugatenio commented
To Reproduce
Steps to reproduce the behavior:
with client as s:
raise Exception()
Expected behavior
The above code should raise the Expectation after the close of the session.
leszekhanusz commented
Please provide the System info as requested in the bug report template.
Sorry, I don't understand what you mean.
Running the following code will raise an Exception as expected:
from gql import Client, gql
from gql.transport.requests import RequestsHTTPTransport
transport = RequestsHTTPTransport(url="https://countries.trevorblades.com/")
client = Client(transport=transport)
with client as s:
raise Exception("foo")
ugatenio commented
Sorry,
The code example is indeed not representing, and it seems the issue was in my original code.
Closing, thanks.