Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kloczek opened this issue Apr 7, 2024 · 1 comment

Comments

@kloczek
Copy link

kloczek commented Apr 7, 2024

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
Copy link
Author

kloczek commented Jun 2, 2024

gentle ping .. any update? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant