ol-iver / denonavr

Automation Library for Denon AVR receivers.
MIT License
176 stars 67 forks source link

Test failure with latest pytest-httpx #228

Closed fabaff closed 2 years ago

fabaff commented 2 years ago

The package build process on NixOS fails with pytest-httpx-0.17.3.

============================= test session starts ==============================
platform linux -- Python 3.9.9, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /build/source
plugins: asyncio-0.16.0, httpx-0.17.3, anyio-3.3.4, timeout-1.4.2
collected 1 item / 1 error                                                     

==================================== ERRORS ====================================
___________________ ERROR collecting tests/test_denonavr.py ____________________
ImportError while importing test module '/build/source/tests/test_denonavr.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/rppr9s436950i1dlzknbmz40m2xqqnxc-python3-3.9.9/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_denonavr.py:12: in <module>
    from pytest_httpx import HTTPXMock, to_response
E   ImportError: cannot import name 'to_response' from 'pytest_httpx' (/nix/store/p44zk6f7in6z2r60qjgv0sdq295mzjr9-python3.9-pytest-httpx-0.17.3/lib/python3.9/site-packages/pytest_httpx/__init__.py)
=========================== short test summary info ============================
ERROR tests/test_denonavr.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.19s ===============================

to_response was deprecated.

ol-iver commented 2 years ago

Thanks, found it and just fixed it.