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

style(black): apply new format style from black #49

Merged

Conversation

manawasp
Copy link

Fix CI issue seen in the PR #48

(I preferred opened another PR to fix this)

@manawasp
Copy link
Author

Thanks for the CI noticed some issue :

FAILED t/unit/test_services.py::test_Service::test_wait_first__propagates_exceptions - RuntimeError: Event loop is closed

I will take a look later, I believe there is a not pin dependency issue maybe related to pytest-asyncio if used.

Copy link
Member

@wbarnha wbarnha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've re-read this MR several times and I'm still baffled as to why this test is failing:

 =================================== FAILURES ===================================
_____________ test_Service.test_wait_first__propagates_exceptions ______________

self = <t.unit.test_services.test_Service object at 0x7f2d2cd492d0>

    @pytest.mark.asyncio
    async def test_wait_first__propagates_exceptions(self, *, service):
        exc = KeyError("foo")
        m1 = Mock()
        m1.done.return_value = True
        m1.exception.return_value = exc
        m1.result.side_effect = exc
        with patch("asyncio.wait", AsyncMock()) as wait:
            wait.return_value = ((m1,), ())
            with pytest.raises(KeyError):
>               await service.wait_first(asyncio.sleep(5), timeout=5)

t/unit/test_services.py:629: 

I'll need to look around more. Sorry that such a simple change turned into this much of an inconvenience. 🤦‍♂️

@manawasp
Copy link
Author

manawasp commented Feb 22, 2024

No pb !

I strongly believe fixing pytest-asyncio in test to 0.21.1 will fix the issue related to pytest-dev/pytest-asyncio#706

EDIT:

I ran tests locally and got issue with the test test_secs_for_next_with_tz due to missing timezone "US/Pacific" but I'm not sure if the timezone source is Python internal or related to computer setup.

Copy link
Member

@wbarnha wbarnha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pytest-asyncio is having some issues right now, so pinning is the right move for now. LGTM!

@wbarnha wbarnha merged commit 9bedd87 into faust-streaming:master Feb 22, 2024
10 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants