From ce63f7ea841937b1aba5b4397c4dd467f83c4cf7 Mon Sep 17 00:00:00 2001 From: cle-b Date: Sat, 28 Mar 2026 10:22:02 +0100 Subject: [PATCH 1/9] pin github actions with commit sha --- .github/workflows/build.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d026d11..bc05c06 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,11 +9,11 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 5 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: - python-version: "3.10" + python-version: "3.14" - name: Lint code run: | make setup @@ -25,9 +25,9 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 5 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Python 3.10 - uses: actions/setup-python@v5 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: "3.10" - name: Run all tests + code coverage @@ -52,9 +52,9 @@ jobs: os: [macos-latest, windows-latest, ubuntu-latest] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.python-version }} - name: Run tests @@ -72,9 +72,9 @@ jobs: id-token: write # IMPORTANT: mandatory for trusted publishing timeout-minutes: 10 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: 3.11 - name: Install pypa/build @@ -89,7 +89,7 @@ jobs: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && github.actor == github.repository_owner - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 with: name: python-package-distributions path: dist/ @@ -98,4 +98,4 @@ jobs: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && github.actor == github.repository_owner - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 From c8e27cf780c8ff8a224c6724925d393216f2b44b Mon Sep 17 00:00:00 2001 From: cle-b Date: Sat, 28 Mar 2026 10:22:14 +0100 Subject: [PATCH 2/9] code format --- Makefile | 4 ++-- tests/demo_run_multiprocess.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 71548be..7371c41 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,10 @@ setup: pip install -r requirements-dev-ui.txt format: - black httpdbg tests + black httpdbg tests --target-version py39 lint: - black --check httpdbg tests + black --check httpdbg tests --target-version py39 flake8 httpdbg tests typing: diff --git a/tests/demo_run_multiprocess.py b/tests/demo_run_multiprocess.py index be87171..02a779c 100644 --- a/tests/demo_run_multiprocess.py +++ b/tests/demo_run_multiprocess.py @@ -2,7 +2,6 @@ import os import requests - BASE_URL = os.environ.get( "HTTPDBG_TEST_MULTIPROCESS_BASE_URL", "http://localhost:4909/" ) From a58975b4306436d3320e77f26bd5d9f9f356b14d Mon Sep 17 00:00:00 2001 From: cle-b Date: Sat, 28 Mar 2026 10:22:38 +0100 Subject: [PATCH 3/9] remove utf8 --- httpdbg/exception.py | 1 - httpdbg/hooks/__init__.py | 1 - httpdbg/hooks/external.py | 1 - httpdbg/hooks/fastapi.py | 1 - httpdbg/hooks/flask.py | 1 - httpdbg/hooks/pytest.py | 1 - httpdbg/hooks/starlette.py | 1 - httpdbg/hooks/unittest.py | 1 - httpdbg/hooks/utils.py | 1 - httpdbg/initiator.py | 1 - httpdbg/mode_console.py | 1 - httpdbg/mode_module.py | 1 - httpdbg/mode_script.py | 1 - httpdbg/server.py | 1 - httpdbg/utils.py | 1 - httpdbg/webapp/api.py | 1 - tests/conftest.py | 1 - tests/demo_run_pytest.py | 1 - tests/demo_run_script.py | 1 - tests/initiator_pck/__init__.py | 1 - tests/initiator_pck/initiator2/initiator3/__init__.py | 1 - tests/initiator_pck/initiator2/mod2.py | 1 - tests/initiator_pck/mod1.py | 1 - tests/test_api.py | 1 - tests/test_cli.py | 1 - tests/test_context_manager.py | 1 - tests/test_hook_aiohttp.py | 1 - tests/test_hook_httpx.py | 1 - tests/test_hook_pytest.py | 1 - tests/test_hook_requests.py | 1 - tests/test_hook_unittest.py | 1 - tests/test_hook_urllib3.py | 1 - tests/test_initiator.py | 1 - tests/test_mode_console.py | 1 - tests/test_mode_module_pytest.py | 1 - tests/test_mode_script.py | 1 - tests/test_preview.py | 1 - tests/test_pyhttpdbg_server.py | 1 - tests/test_server.py | 1 - tests/ui/test_web.py | 1 - tests/ui/web/ui.py | 1 - 41 files changed, 41 deletions(-) diff --git a/httpdbg/exception.py b/httpdbg/exception.py index 5907121..596fe31 100644 --- a/httpdbg/exception.py +++ b/httpdbg/exception.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- class HttpdbgException(Exception): diff --git a/httpdbg/hooks/__init__.py b/httpdbg/hooks/__init__.py index 40a96af..e69de29 100644 --- a/httpdbg/hooks/__init__.py +++ b/httpdbg/hooks/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/httpdbg/hooks/external.py b/httpdbg/hooks/external.py index 62b57f4..33c4dc3 100644 --- a/httpdbg/hooks/external.py +++ b/httpdbg/hooks/external.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from contextlib import contextmanager from typing import Generator import glob diff --git a/httpdbg/hooks/fastapi.py b/httpdbg/hooks/fastapi.py index f337d81..f3d232e 100644 --- a/httpdbg/hooks/fastapi.py +++ b/httpdbg/hooks/fastapi.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from collections.abc import Callable from contextlib import contextmanager import functools diff --git a/httpdbg/hooks/flask.py b/httpdbg/hooks/flask.py index bb0f6ce..1c2364b 100644 --- a/httpdbg/hooks/flask.py +++ b/httpdbg/hooks/flask.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from collections.abc import Callable from contextlib import contextmanager import functools diff --git a/httpdbg/hooks/pytest.py b/httpdbg/hooks/pytest.py index da64f8b..14d7743 100644 --- a/httpdbg/hooks/pytest.py +++ b/httpdbg/hooks/pytest.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from collections.abc import Callable from contextlib import contextmanager from typing import Generator diff --git a/httpdbg/hooks/starlette.py b/httpdbg/hooks/starlette.py index 9f19d82..8de12d5 100644 --- a/httpdbg/hooks/starlette.py +++ b/httpdbg/hooks/starlette.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from collections.abc import Callable from contextlib import contextmanager from functools import wraps diff --git a/httpdbg/hooks/unittest.py b/httpdbg/hooks/unittest.py index fee8999..2d1d130 100644 --- a/httpdbg/hooks/unittest.py +++ b/httpdbg/hooks/unittest.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from collections.abc import Callable from contextlib import contextmanager import inspect diff --git a/httpdbg/hooks/utils.py b/httpdbg/hooks/utils.py index 1f1d2a1..d9d186b 100644 --- a/httpdbg/hooks/utils.py +++ b/httpdbg/hooks/utils.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from collections.abc import Callable import inspect import typing diff --git a/httpdbg/initiator.py b/httpdbg/initiator.py index 8742706..23bc969 100644 --- a/httpdbg/initiator.py +++ b/httpdbg/initiator.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from collections.abc import Callable from contextlib import contextmanager import datetime diff --git a/httpdbg/mode_console.py b/httpdbg/mode_console.py index e68af14..655345a 100644 --- a/httpdbg/mode_console.py +++ b/httpdbg/mode_console.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import code from typing import Union diff --git a/httpdbg/mode_module.py b/httpdbg/mode_module.py index 2cb40d7..65882d6 100644 --- a/httpdbg/mode_module.py +++ b/httpdbg/mode_module.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import runpy from unittest.mock import patch import sys diff --git a/httpdbg/mode_script.py b/httpdbg/mode_script.py index bca154f..d3c0646 100644 --- a/httpdbg/mode_script.py +++ b/httpdbg/mode_script.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import os import runpy import sys diff --git a/httpdbg/server.py b/httpdbg/server.py index 1247812..0fac311 100644 --- a/httpdbg/server.py +++ b/httpdbg/server.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from contextlib import contextmanager from http.server import HTTPServer import threading diff --git a/httpdbg/utils.py b/httpdbg/utils.py index e1ab431..3d1ccba 100644 --- a/httpdbg/utils.py +++ b/httpdbg/utils.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from http.cookies import SimpleCookie import secrets import string diff --git a/httpdbg/webapp/api.py b/httpdbg/webapp/api.py index b2e0efa..db41916 100644 --- a/httpdbg/webapp/api.py +++ b/httpdbg/webapp/api.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from json import JSONEncoder import traceback from typing import Any diff --git a/tests/conftest.py b/tests/conftest.py index 76479a8..11e51f5 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from itertools import count import os diff --git a/tests/demo_run_pytest.py b/tests/demo_run_pytest.py index bf21d9a..6d4bdf4 100644 --- a/tests/demo_run_pytest.py +++ b/tests/demo_run_pytest.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import os import pytest diff --git a/tests/demo_run_script.py b/tests/demo_run_script.py index ea0557d..5dfc57b 100644 --- a/tests/demo_run_script.py +++ b/tests/demo_run_script.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import sys import requests diff --git a/tests/initiator_pck/__init__.py b/tests/initiator_pck/__init__.py index 6847111..ed7dd21 100644 --- a/tests/initiator_pck/__init__.py +++ b/tests/initiator_pck/__init__.py @@ -1,3 +1,2 @@ -# -*- coding: utf-8 -*- from .initiator2.mod2 import fnc_async # noqa from .initiator2.mod2 import fnc_in_subpackage # noqa diff --git a/tests/initiator_pck/initiator2/initiator3/__init__.py b/tests/initiator_pck/initiator2/initiator3/__init__.py index 113c820..a06e820 100644 --- a/tests/initiator_pck/initiator2/initiator3/__init__.py +++ b/tests/initiator_pck/initiator2/initiator3/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import requests diff --git a/tests/initiator_pck/initiator2/mod2.py b/tests/initiator_pck/initiator2/mod2.py index f978791..5c03926 100644 --- a/tests/initiator_pck/initiator2/mod2.py +++ b/tests/initiator_pck/initiator2/mod2.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import httpx import requests diff --git a/tests/initiator_pck/mod1.py b/tests/initiator_pck/mod1.py index eebcc3a..0bb7a50 100644 --- a/tests/initiator_pck/mod1.py +++ b/tests/initiator_pck/mod1.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import requests diff --git a/tests/test_api.py b/tests/test_api.py index 27e60e1..cc4bc42 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import requests import pytest diff --git a/tests/test_cli.py b/tests/test_cli.py index 732ad4d..4592bd5 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import pytest from httpdbg import __version__ diff --git a/tests/test_context_manager.py b/tests/test_context_manager.py index 6f402ad..e74b4f8 100644 --- a/tests/test_context_manager.py +++ b/tests/test_context_manager.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from httpdbg import httprecord import pytest diff --git a/tests/test_hook_aiohttp.py b/tests/test_hook_aiohttp.py index 768b8f4..0a789aa 100644 --- a/tests/test_hook_aiohttp.py +++ b/tests/test_hook_aiohttp.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import json import platform diff --git a/tests/test_hook_httpx.py b/tests/test_hook_httpx.py index e0fbf7d..77f550c 100644 --- a/tests/test_hook_httpx.py +++ b/tests/test_hook_httpx.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import json import platform diff --git a/tests/test_hook_pytest.py b/tests/test_hook_pytest.py index b8c02ce..4d7b824 100644 --- a/tests/test_hook_pytest.py +++ b/tests/test_hook_pytest.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import os import pytest diff --git a/tests/test_hook_requests.py b/tests/test_hook_requests.py index 8167564..3818355 100644 --- a/tests/test_hook_requests.py +++ b/tests/test_hook_requests.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import json import pytest diff --git a/tests/test_hook_unittest.py b/tests/test_hook_unittest.py index 3e2acd2..d7ef601 100644 --- a/tests/test_hook_unittest.py +++ b/tests/test_hook_unittest.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import os import pytest diff --git a/tests/test_hook_urllib3.py b/tests/test_hook_urllib3.py index 85fd366..b042d36 100644 --- a/tests/test_hook_urllib3.py +++ b/tests/test_hook_urllib3.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import json from packaging import version import pkg_resources diff --git a/tests/test_initiator.py b/tests/test_initiator.py index beda516..1d99949 100644 --- a/tests/test_initiator.py +++ b/tests/test_initiator.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import asyncio import platform diff --git a/tests/test_mode_console.py b/tests/test_mode_console.py index 718c8c3..682b7f9 100644 --- a/tests/test_mode_console.py +++ b/tests/test_mode_console.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import pytest import requests diff --git a/tests/test_mode_module_pytest.py b/tests/test_mode_module_pytest.py index 50b3c8f..5f4c9ee 100644 --- a/tests/test_mode_module_pytest.py +++ b/tests/test_mode_module_pytest.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import os import pytest diff --git a/tests/test_mode_script.py b/tests/test_mode_script.py index 3648458..2ebb1e9 100644 --- a/tests/test_mode_script.py +++ b/tests/test_mode_script.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import os import pytest diff --git a/tests/test_preview.py b/tests/test_preview.py index 3b9eeb4..f1bc62e 100644 --- a/tests/test_preview.py +++ b/tests/test_preview.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import pytest from httpdbg.preview import generate_preview diff --git a/tests/test_pyhttpdbg_server.py b/tests/test_pyhttpdbg_server.py index 6f64d44..94d890d 100644 --- a/tests/test_pyhttpdbg_server.py +++ b/tests/test_pyhttpdbg_server.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import requests import pytest diff --git a/tests/test_server.py b/tests/test_server.py index 6fb8002..e6d1445 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import pytest import requests diff --git a/tests/ui/test_web.py b/tests/ui/test_web.py index aafab6f..8c39b70 100644 --- a/tests/ui/test_web.py +++ b/tests/ui/test_web.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import random import pytest diff --git a/tests/ui/web/ui.py b/tests/ui/web/ui.py index c152d80..95b3ec4 100644 --- a/tests/ui/web/ui.py +++ b/tests/ui/web/ui.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import niobium # noqa: F401 - niobium automatically patches selenium from selenium.webdriver.common.by import By From cfdee2adfe387188ea9f3b4ec281e3bb44745990 Mon Sep 17 00:00:00 2001 From: cle-b Date: Sat, 28 Mar 2026 10:22:58 +0100 Subject: [PATCH 4/9] version --- httpdbg/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpdbg/__init__.py b/httpdbg/__init__.py index e240b7e..92386af 100644 --- a/httpdbg/__init__.py +++ b/httpdbg/__init__.py @@ -1,4 +1,4 @@ -__version__ = "2.1.5" +__version__ = "2.1.6" __all__ = ["export_html", "httprecord", "HTTPRecords"] From 332199f7097802622b63d3bb09444067e9ab1137 Mon Sep 17 00:00:00 2001 From: cle-b Date: Sat, 28 Mar 2026 10:23:22 +0100 Subject: [PATCH 5/9] code format --- httpdbg/exception.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/httpdbg/exception.py b/httpdbg/exception.py index 596fe31..1c4adcb 100644 --- a/httpdbg/exception.py +++ b/httpdbg/exception.py @@ -1,5 +1,3 @@ - - class HttpdbgException(Exception): """An issue occurred in httpdbg.""" From 278c13bd3e08c36df5069312023576ac8929d79a Mon Sep 17 00:00:00 2001 From: cle-b Date: Sat, 28 Mar 2026 10:36:36 +0100 Subject: [PATCH 6/9] typing --- httpdbg/mode_console.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpdbg/mode_console.py b/httpdbg/mode_console.py index 655345a..71b7b35 100644 --- a/httpdbg/mode_console.py +++ b/httpdbg/mode_console.py @@ -17,7 +17,7 @@ def __init__(self, records: HTTPRecords, locals=None): self.incomplete_block: bool = False super().__init__(locals) - def push(self, line): + def push(self, line) -> bool: if line: # if the line is empty, we don't add it in the history if ( self.incomplete_block From 015f3304a3bba44436f1c6609b7972b4a52b2ed6 Mon Sep 17 00:00:00 2001 From: cle-b Date: Sat, 28 Mar 2026 10:41:39 +0100 Subject: [PATCH 7/9] fix method to be compatible with py314 --- httpdbg/mode_console.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/httpdbg/mode_console.py b/httpdbg/mode_console.py index 71b7b35..a2b8fc1 100644 --- a/httpdbg/mode_console.py +++ b/httpdbg/mode_console.py @@ -1,4 +1,5 @@ import code +from typing import Optional from typing import Union from httpdbg.records import HTTPRecords @@ -17,7 +18,7 @@ def __init__(self, records: HTTPRecords, locals=None): self.incomplete_block: bool = False super().__init__(locals) - def push(self, line) -> bool: + def push(self, line: str, filename: Optional[str] = None) -> bool: if line: # if the line is empty, we don't add it in the history if ( self.incomplete_block @@ -42,7 +43,10 @@ def push(self, line) -> bool: full_label = ">>> " + "\n>>> ".join(latest_history) with httpdbg_group(self.records, label, full_label): - self.incomplete_block = super().push(line) + if filename is None: + self.incomplete_block = super().push(line) + else: + self.incomplete_block = super().push(line, filename) return self.incomplete_block From 3eee91bcdd32ef91b0daf16a6c3b145167339649 Mon Sep 17 00:00:00 2001 From: cle-b Date: Sat, 28 Mar 2026 10:55:25 +0100 Subject: [PATCH 8/9] fix test --- tests/test_hook_urllib3.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/test_hook_urllib3.py b/tests/test_hook_urllib3.py index b042d36..c561ac9 100644 --- a/tests/test_hook_urllib3.py +++ b/tests/test_hook_urllib3.py @@ -1,6 +1,5 @@ import json from packaging import version -import pkg_resources import pytest import urllib3 @@ -245,8 +244,7 @@ def test_urllib3_get_empty_request_content(httpbin_both): @pytest.mark.initiator @pytest.mark.urllib3 @pytest.mark.skipif( - version.parse(pkg_resources.get_distribution("urllib3").version) - < version.parse("2.0.0"), + version.parse(urllib3.__version__) < version.parse("2.0.0"), reason="only urllib3 v2", ) def test_urllib3_v2_request(httpbin): From bc2b60dd771af0a69865d4895ae2527eb07d531a Mon Sep 17 00:00:00 2001 From: cle-b Date: Sat, 28 Mar 2026 11:18:59 +0100 Subject: [PATCH 9/9] fix test --- tests/test_initiator.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/test_initiator.py b/tests/test_initiator.py index 1d99949..0cfddde 100644 --- a/tests/test_initiator.py +++ b/tests/test_initiator.py @@ -23,8 +23,8 @@ def test_initiator_script(httpbin): assert initiator.label == 'requests.get(f"{httpbin.url}/get")' assert ( - '''test_initiator.py", line 19, in test_initiator_script - 19. requests.get(f"{httpbin.url}/get") + '''test_initiator.py", line 18, in test_initiator_script + 18. requests.get(f"{httpbin.url}/get") ---------- requests.api.get( url="''' @@ -34,18 +34,18 @@ def test_initiator_script(httpbin): in initiator.short_stack ) - full_stack_ref = """test_initiator.py", line 19, - 15. @pytest.mark.initiator - 16. def test_initiator_script(httpbin): - 17. - 18. with httprecord() as records: - 19. requests.get(f"{httpbin.url}/get") <==== - 20. - 21. assert len(records) == 1 - 22. initiator = records.initiators[records[0].initiator_id] - 23. - 24. assert initiator.label == 'requests.get(f"{httpbin.url}/get")' - 25.""" # noqa W291 + full_stack_ref = """test_initiator.py", line 18, + 14. @pytest.mark.initiator + 15. def test_initiator_script(httpbin): + 16. + 17. with httprecord() as records: + 18. requests.get(f"{httpbin.url}/get") <==== + 19. + 20. assert len(records) == 1 + 21. initiator = records.initiators[records[0].initiator_id] + 22. + 23. assert initiator.label == 'requests.get(f"{httpbin.url}/get")' + 24.""" # noqa W291 full_stack = initiator.stack[0] assert ( full_stack_ref in full_stack