Skip to content

Commit 783c18b

Browse files
committed
升级版本
1 parent ea4b95d commit 783c18b

4 files changed

Lines changed: 2 additions & 33 deletions

File tree

‎pytest/pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "testsolar-pytestx"
3-
version = "0.1.68"
3+
version = "0.1.69"
44
description = "Pytest tool for TestSolar"
55
authors = [
66
{name = "asiazhang2002", email = "asiazhang2002@gmail.com"},

‎pytest/src/testsolar_pytestx/header_injection.py‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,16 +151,12 @@ def _patch_httpx() -> None:
151151

152152
def _patched_httpx_request(self: Any, method: str, url: str, **kwargs: Any) -> Any:
153153
nodeid = get_current_test_nodeid()
154-
logger.info("starting patch httpx request...")
155154
if nodeid:
156-
logger.debug(f"Injecting nodeid {nodeid} to httpx request headers")
157155
headers = kwargs.get("headers")
158156
kwargs["headers"] = _inject_header_to_dict(headers, nodeid)
159157

160158
if _original_httpx_client_request:
161-
logger.info("return patched httpx request")
162159
return _original_httpx_client_request(self, method, url, **kwargs)
163-
logger.info("return None")
164160
return None
165161

166162
httpx.Client.request = _patched_httpx_request
@@ -173,17 +169,13 @@ def _patched_httpx_request(self: Any, method: str, url: str, **kwargs: Any) -> A
173169
async def _patched_httpx_async_request(
174170
self: Any, method: str, url: str, **kwargs: Any
175171
) -> Any:
176-
logger.info("starting patch httpx async request...")
177172
nodeid = get_current_test_nodeid()
178173
if nodeid:
179-
logger.debug(f"Injecting nodeid {nodeid} to httpx async request headers")
180174
headers = kwargs.get("headers")
181175
kwargs["headers"] = _inject_header_to_dict(headers, nodeid)
182176

183177
if _original_httpx_async_client_request:
184-
logger.info("return patched httpx request")
185178
return await _original_httpx_async_client_request(self, method, url, **kwargs)
186-
logger.info("return None")
187179
return None
188180

189181
httpx.AsyncClient.request = _patched_httpx_async_request

‎pytest/testdata/conftest.py‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

‎pytest/uv.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)