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

Tests are failing on Python 3.9 #6

Open
fabaff opened this issue Sep 17, 2020 · 1 comment
Open

Tests are failing on Python 3.9 #6

fabaff opened this issue Sep 17, 2020 · 1 comment

Comments

@fabaff
Copy link

fabaff commented Sep 17, 2020

The async tests are failing during the RPM build process with Python 3.9.

+ /usr/bin/pytest -v tests
============================= test session starts ==============================
platform linux -- Python 3.9.0rc1, pytest-6.0.2, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /builddir/build/BUILD/pyblackbird-0.5
collecting ... collected 17 items
tests/test_blackbird.py::TestZoneStatus::test_zone_status_broken PASSED  [  5%]
tests/test_blackbird.py::TestBlackbird::test_front_button_status PASSED  [ 11%]
tests/test_blackbird.py::TestBlackbird::test_lock_front_buttons PASSED   [ 17%]
tests/test_blackbird.py::TestBlackbird::test_set_all_zone_source PASSED  [ 23%]
tests/test_blackbird.py::TestBlackbird::test_set_zone_power PASSED       [ 29%]
tests/test_blackbird.py::TestBlackbird::test_set_zone_source PASSED      [ 35%]
tests/test_blackbird.py::TestBlackbird::test_timeout PASSED              [ 41%]
tests/test_blackbird.py::TestBlackbird::test_unlock_front_buttons PASSED [ 47%]
tests/test_blackbird.py::TestBlackbird::test_zone_status PASSED          [ 52%]
tests/test_blackbird.py::TestAsyncBlackbird::test_front_button_status FAILED [ 58%]
tests/test_blackbird.py::TestAsyncBlackbird::test_lock_front_buttons FAILED [ 64%]
tests/test_blackbird.py::TestAsyncBlackbird::test_set_all_zone_source FAILED [ 70%]
tests/test_blackbird.py::TestAsyncBlackbird::test_set_zone_power FAILED  [ 76%]
tests/test_blackbird.py::TestAsyncBlackbird::test_set_zone_source FAILED [ 82%]
tests/test_blackbird.py::TestAsyncBlackbird::test_timeout FAILED         [ 88%]
tests/test_blackbird.py::TestAsyncBlackbird::test_unlock_front_buttons FAILED [ 94%]
tests/test_blackbird.py::TestAsyncBlackbird::test_zone_status FAILED     [100%]
=================================== FAILURES ===================================
_________________ TestAsyncBlackbird.test_front_button_status __________________
self = <tests.test_blackbird.TestAsyncBlackbird testMethod=test_front_button_status>
    def test_front_button_status(self):
        self.responses[b'%9961.\r'] = b'System Locked!\r'
>       status = self.blackbird.lock_status()
tests/test_blackbird.py:78: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_blackbird.py:102: in f
    return loop.run_until_complete(blackbird.__getattribute__(item)(*args, **kwargs))
/usr/lib64/python3.9/asyncio/base_events.py:642: in run_until_complete
    return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
args = (<pyblackbird.get_async_blackbird.<locals>.BlackbirdAsync object at 0x3ffab0eeee0>,)
kwargs = {}
    @asyncio.coroutine
    @wraps(coro)
    def wrapper(*args, **kwargs):
>       with (yield from lock):
E       TypeError: 'Lock' object is not iterable
pyblackbird/__init__.py:280: TypeError
__________________ TestAsyncBlackbird.test_lock_front_buttons __________________
self = <tests.test_blackbird.TestAsyncBlackbird testMethod=test_lock_front_buttons>
    def test_lock_front_buttons(self):
        self.responses[b'/%Lock;\r'] = b'System Locked!\r'
>       self.blackbird.lock_front_buttons()
tests/test_blackbird.py:67: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_blackbird.py:102: in f
    return loop.run_until_complete(blackbird.__getattribute__(item)(*args, **kwargs))
/usr/lib64/python3.9/asyncio/base_events.py:642: in run_until_complete
    return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
args = (<pyblackbird.get_async_blackbird.<locals>.BlackbirdAsync object at 0x3ffa8680cd0>,)
kwargs = {}
    @asyncio.coroutine
    @wraps(coro)
    def wrapper(*args, **kwargs):
>       with (yield from lock):
E       TypeError: 'Lock' object is not iterable
pyblackbird/__init__.py:280: TypeError
[...]
@tirkarthi
Copy link

Probably due to python/cpython#17533

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

2 participants