8000 Update pytest to 8.2.2 and pytest-asyncio to 0.23.7 by albertvillanova · Pull Request #2883 · huggingface/dataset-viewer · GitHub
[go: up one dir, main page]

Skip to content

Update pytest to 8.2.2 and pytest-asyncio to 0.23.7 #2883

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

Merged
merged 13 commits into from
Jun 6, 2024

Conversation

albertvillanova
Copy link
Member
@albertvillanova albertvillanova commented Jun 5, 2024

Update pytest to 8.2.2: https://github.com/pytest-dev/pytest/releases/tag/8.2.2

The update of pytest requires the update of pytest-asyncio as well. See:

Otherwise, we get an AttributeError: https://github.com/huggingface/dataset-viewer/actions/runs/9378353611/job/25821435791

AttributeError: 'FixtureDef' object has no attribute 'unittest'
==================================== ERRORS ====================================
____________________ ERROR at setup of test_get_healthcheck ____________________

event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>
request = <SubRequest 'app_test' for <Function test_get_healthcheck>>
kwargs = {'app_config': AppConfig(api=ApiConfig(external_auth_url='http://localhost:8888/api/datasets/%s/auth-check', hf_auth_p...onfig(level=20), queue=QueueConfig(mongo_database='dataset_viewer_queue_test', mongo_url='mongodb://localhost:27017'))}

    @functools.wraps(fixture)
    def _asyncgen_fixture_wrapper(
        event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any
    ):
        func = _perhaps_rebind_fixture_func(
>           fixture, request.instance, fixturedef.unittest
        )
E       AttributeError: 'FixtureDef' object has no attribute 'unittest'

/home/runner/.cache/pypoetry/virtualenvs/sse-api-Z9Qw0xoN-py3.9/lib/python3.9/site-packages/pytest_asyncio/plugin.py:276: AttributeError
=========================== short test summary info ============================
ERROR tests/test_app.py::test_get_healthcheck - AttributeError: 'FixtureDef' object has no attribute 'unittest'
ERROR tests/test_app.py::test_metrics - AttributeError: 'FixtureDef' object has no attribute 'unittest'
ERROR tests/test_app.py::test_hub_cache_only_updates - AttributeError: 'FixtureDef' object has no attribute 'unittest'
ERROR tests/test_app.py::test_hub_cache_only_initialization[?all=true-expected_events0] - AttributeError: 'FixtureDef' object has no attribute 'unittest'
ERROR tests/test_app.py::test_hub_cache_only_initialization[-expected_events1] - AttributeError: 'FixtureDef' object has no attribute 'unittest'
ERROR tests/test_app.py::test_hub_cache_only_initialization[?all=false-expected_events2] - AttributeError: 'FixtureDef' object has no attribute 'unittest'
ERROR tests/test_app.py::test_hub_cache_initialization_and_updates[?all=true-expected_events0] - AttributeError: 'FixtureDef' object has no attribute 'unittest'
ERROR tests/test_app.py::test_hub_cache_initialization_and_updates[?all=false-expected_events1] - AttributeError: 'FixtureDef' object has no attribute 'unittest'
ERROR tests/test_app.py::test_hub_cache_initialization_and_updates[-expected_events2] - AttributeError: 'FixtureDef' object has no attribute 'unittest'
========================= 1 passed, 9 errors in 1.09s ==========================

@albertvillanova albertvillanova changed the title Update pytest to 8.2.2 Update pytest to 8.2.2 and pytest-asyncio to 0.23.7 Jun 5, 2024
@albertvillanova albertvillanova marked this pull request as draft June 5, 2024 05:32
@albertvillanova albertvillanova marked this pull request as ready for review June 5, 2024 09:46
@albertvillanova albertvillanova requested a review from a team June 6, 2024 10:28
@albertvillanova albertvillanova merged commit 67872e9 into main Jun 6, 2024
@albertvillanova albertvillanova deleted the update-pytest-8.2.2 branch June 6, 2024 10:42
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.

2 participants
0