jamielennox / requests-mock

Mocked responses for the requests library
https://requests-mock.readthedocs.io
Apache License 2.0
447 stars 71 forks source link

1.12.1: pytest fails in `tests/pytest/test_with_pytest.py::test_threaded_sessions` unit #258

Open kloczek opened 7 months ago

kloczek commented 7 months ago

Looks like something is not finished because this unit tries to import requests_futures.sessions which seem s does not exist.

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-requests-mock-1.12.1-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-requests-mock-1.12.1-2.fc37.x86_64/usr/lib/python3.10/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.10.14, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/tkloczko/rpmbuild/BUILD/requests-mock-1.12.1
configfile: pyproject.toml
plugins: requests-mock-1.12.1
collected 145 items

tests/pytest/test_with_pytest.py ...F.                                                                                                                                                [  3%]
tests/test_adapter.py ......................................................                                                                                                          [ 40%]
tests/test_custom_matchers.py ...                                                                                                                                                     [ 42%]
tests/test_fixture.py ...                                                                                                                                                             [ 44%]
tests/test_matcher.py ...............                                                                                                                                                 [ 55%]
tests/test_mocker.py ....................................                                                                                                                             [ 80%]
tests/test_request.py ..............                                                                                                                                                  [ 89%]
tests/test_response.py ...............                                                                                                                                                [100%]

========================================================================================= FAILURES ==========================================================================================
__________________________________________________________________________________ test_threaded_sessions ___________________________________________________________________________________

    def test_threaded_sessions():
        """
        When using requests_futures.FuturesSession() with a ThreadPoolExecutor
        there is a race condition where one threaded request removes the
        monkeypatched get_adapter() method from the Session before another threaded
        request is finished using it.
        """
>       from requests_futures.sessions import FuturesSession
E       ModuleNotFoundError: No module named 'requests_futures'

tests/pytest/test_with_pytest.py:85: ModuleNotFoundError
================================================================================== short test summary info ==================================================================================
FAILED tests/pytest/test_with_pytest.py::test_threaded_sessions - ModuleNotFoundError: No module named 'requests_futures'
=============================================================================== 1 failed, 144 passed in 0.57s ===============================================================================
kloczek commented 5 months ago

gentle ping .. any update? 🤔