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 fail on Python 3.10 #17

Closed
juledwar opened this issue Mar 3, 2022 · 0 comments
Closed

Tests fail on Python 3.10 #17

juledwar opened this issue Mar 3, 2022 · 0 comments

Comments

@juledwar
Copy link
Contributor

juledwar commented Mar 3, 2022

I just run tox on a system with python 3.10:


broker = <MemoryBroker: 729764a3-16c9-493f-baf4-feb394d43fa5>

    def test_periodic_tasks(broker):
        tasks = [
            Task(print, 'foo', 'q1', 0, timedelta(seconds=5)),
            Task(print, 'bar', 'q1', 0, timedelta(seconds=10))
        ]
        broker.register_periodic_tasks(tasks)
    
>       r = broker.inspect_periodic_tasks()

tests/test_brokers.py:136: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
spinach/brokers/memory.py:129: in inspect_periodic_tasks
    return [(int(e[0]), e[3][0].name) for e in self._scheduler.queue]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

.0 = <list_iterator object at 0x7f3797d9b3d0>

>   return [(int(e[0]), e[3][0].name) for e in self._scheduler.queue]
E   TypeError: 'method' object is not subscriptable

spinach/brokers/memory.py:129: TypeError
NicolasLM added a commit that referenced this issue Jun 17, 2022
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