Skip to content

Commit 18fead4

Browse files
author
Johannes Richter
committed
Respect coding guidelines
1 parent 78f954b commit 18fead4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,18 +202,20 @@ def test_gql():
202202
assert result["user"] is None
203203

204204

205+
@pytest.mark.requests
205206
def test_sync_transport_close_on_schema_retrieval_failure():
206207
"""
207208
Ensure that the transport session is closed if an error occurs when
208209
entering the context manager (e.g., because schema retrieval fails)
209210
"""
210211

211212
from gql.transport.requests import RequestsHTTPTransport
213+
212214
transport = RequestsHTTPTransport(url="http://localhost/")
213215
client = Client(transport=transport, fetch_schema_from_transport=True)
214216

215217
try:
216-
with client as session:
218+
with client:
217219
pass
218220
except Exception:
219221
# we don't care what exception is thrown, we just want to check if the
@@ -232,11 +234,12 @@ async def test_async_transport_close_on_schema_retrieval_failure():
232234
"""
233235

234236
from gql.transport.aiohttp import AIOHTTPTransport
237+
235238
transport = AIOHTTPTransport(url="http://localhost/")
236239
client = Client(transport=transport, fetch_schema_from_transport=True)
237240

238241
try:
239-
async with client as session:
242+
async with client:
240243
pass
241244
except Exception:
242245
# we don't care what exception is thrown, we just want to check if the

0 commit comments

Comments
 (0)