Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ classifiers = [
]
dynamic = ["version"]
dependencies = [
"httpdbg>=0.32.0",
"httpdbg>=1.2.5",
"pytest>=7.0.0"
]

Expand Down
2 changes: 1 addition & 1 deletion pytest_httpdbg/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
from pytest_httpdbg.plugin import httpdbg_record_filename # noqa F401

__version__ = "0.8.1"
__version__ = "0.9.0"
7 changes: 5 additions & 2 deletions pytest_httpdbg/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ def pytest_configure(config):
@pytest.hookimpl(hookwrapper=True)
def pytest_runtest_protocol(item: pytest.Item, nextitem: Optional[pytest.Item]):
if item.config.option.httpdbg:
with httprecord(initiators=item.config.option.httpdbg_initiator) as records:
with httprecord(
initiators=item.config.option.httpdbg_initiator, multiprocess=False
) as records:
# the record of the http requests has been enable using a pytest command line argument
# -> first, we stash the path to the log file
httpdbg_dir = item.config.option.httpdbg_dir
Expand Down Expand Up @@ -171,7 +173,8 @@ def pytest_runtest_protocol(item: pytest.Item, nextitem: Optional[pytest.Item]):
def pytest_sessionstart(session):
if session.config.option.httpdbg_allure:
session.httpdbg_recorder = httprecord(
initiators=session.config.option.httpdbg_initiator
initiators=session.config.option.httpdbg_initiator,
multiprocess=False,
)
session.httpdbg_records = session.httpdbg_recorder.__enter__()

Expand Down
3 changes: 3 additions & 0 deletions tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import glob
import os

import pytest

confest_py = """
import pytest
import requests
Expand Down Expand Up @@ -77,6 +79,7 @@ def test_post(httpbin, fixture_session):
assert "test_post" not in log


@pytest.mark.skip(reason="https://github.com/cle-b/pytest-httpdbg/issues/16")

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not related to this PR (fails since httpdbg 1.2.2)

def test_with_initiator(pytester, tmp_path):
logs_dir = tmp_path / "logs"
logs_dir.mkdir()
Expand Down
Loading