From 5678b13b4740bd6f08112d6fe80421ab942cdccc Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Mon, 8 Dec 2025 09:19:48 -0500 Subject: [PATCH] Fix ruff SIM117: use combined with statement --- tests/integration/test_aiohttp.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/integration/test_aiohttp.py b/tests/integration/test_aiohttp.py index 4dfe6b8..bcef875 100644 --- a/tests/integration/test_aiohttp.py +++ b/tests/integration/test_aiohttp.py @@ -176,11 +176,11 @@ def test_post(tmpdir, kwargs, caplog, httpbin): @pytest.mark.online def test_post_data_plus_json_error(tmpdir, httpbin): url = httpbin.url + "/post" - with vcr.use_cassette(str(tmpdir.join("post.yaml"))) as cassette: - with pytest.raises( - ValueError, match="data and json parameters can not be used at the same time" - ): - post(url, data=POST_DATA, json=POST_DATA) + with ( + vcr.use_cassette(str(tmpdir.join("post.yaml"))) as cassette, + pytest.raises(ValueError, match="data and json parameters can not be used at the same time"), + ): + post(url, data=POST_DATA, json=POST_DATA) assert cassette.requests == []