jamielennox / requests-mock

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

1.11.0: `requests-mock` is not ready for latest `testtools` 2.7.0 #242

Closed kloczek closed 12 months ago

kloczek commented 12 months ago

Pytest is failing with:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-requests-mock-1.11.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-requests-mock-1.11.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
============================= test session starts ==============================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/requests-mock-1.11.0
plugins: requests-mock-1.11.0
collected 5 items / 7 errors

==================================== ERRORS ====================================
____________________ ERROR collecting tests/test_adapter.py ____________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/requests-mock-1.11.0/tests/test_adapter.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_adapter.py:22: in <module>
    from . import base
tests/base.py:13: in <module>
    import testtools
/usr/lib/python3.8/site-packages/testtools/__init__.py:50: in <module>
    from testtools.matchers._impl import Matcher
E   ModuleNotFoundError: No module named 'testtools.matchers'
________________ ERROR collecting tests/test_custom_matchers.py ________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/requests-mock-1.11.0/tests/test_custom_matchers.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_custom_matchers.py:17: in <module>
    from . import base
tests/base.py:13: in <module>
    import testtools
/usr/lib/python3.8/site-packages/testtools/__init__.py:50: in <module>
    from testtools.matchers._impl import Matcher
E   ModuleNotFoundError: No module named 'testtools.matchers'
____________________ ERROR collecting tests/test_fixture.py ____________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/requests-mock-1.11.0/tests/test_fixture.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_fixture.py:16: in <module>
    from . import base
tests/base.py:13: in <module>
    import testtools
/usr/lib/python3.8/site-packages/testtools/__init__.py:50: in <module>
    from testtools.matchers._impl import Matcher
E   ModuleNotFoundError: No module named 'testtools.matchers'
____________________ ERROR collecting tests/test_matcher.py ____________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/requests-mock-1.11.0/tests/test_matcher.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_matcher.py:16: in <module>
    from . import base
tests/base.py:13: in <module>
    import testtools
/usr/lib/python3.8/site-packages/testtools/__init__.py:50: in <module>
    from testtools.matchers._impl import Matcher
E   ModuleNotFoundError: No module named 'testtools.matchers'
____________________ ERROR collecting tests/test_mocker.py _____________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/requests-mock-1.11.0/tests/test_mocker.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_mocker.py:26: in <module>
    from . import base
tests/base.py:13: in <module>
    import testtools
/usr/lib/python3.8/site-packages/testtools/__init__.py:50: in <module>
    from testtools.matchers._impl import Matcher
E   ModuleNotFoundError: No module named 'testtools.matchers'
____________________ ERROR collecting tests/test_request.py ____________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/requests-mock-1.11.0/tests/test_request.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_request.py:17: in <module>
    from . import base
tests/base.py:13: in <module>
    import testtools
/usr/lib/python3.8/site-packages/testtools/__init__.py:50: in <module>
    from testtools.matchers._impl import Matcher
E   ModuleNotFoundError: No module named 'testtools.matchers'
___________________ ERROR collecting tests/test_response.py ____________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/requests-mock-1.11.0/tests/test_response.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_response.py:19: in <module>
    from . import base
tests/base.py:13: in <module>
    import testtools
/usr/lib/python3.8/site-packages/testtools/__init__.py:50: in <module>
    from testtools.matchers._impl import Matcher
E   ModuleNotFoundError: No module named 'testtools.matchers'
=========================== short test summary info ============================
ERROR tests/test_adapter.py
ERROR tests/test_custom_matchers.py
ERROR tests/test_fixture.py
ERROR tests/test_matcher.py
ERROR tests/test_mocker.py
ERROR tests/test_request.py
ERROR tests/test_response.py
!!!!!!!!!!!!!!!!!!! Interrupted: 7 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 7 errors in 0.25s ===============================
kloczek commented 12 months ago

Closing. testtool 2.7.0 is broken and with 2.7.1 everything os OK