Page MenuHomeSoftware Heritage

add strict asyncio_mode in pytest.ini
ClosedPublic

Authored by pratyush on May 9 2022, 12:42 PM.

Details

Summary

Fix deprecated asyncio_mode legacy pytest warnings

Diff Detail

Repository
rDTSCN Code scanner
Branch
fix/pytestasyiomode
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 29188
Build 45645: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 45644: arc lint + arc unit

Unit TestsFailed

TimeTest
4 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.scanner.tests.test_client::test_client_get_origin_correct_api_request
mock_aioresponse = <aioresponses.core.aioresponses object at 0x7fcefc173400> event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> aiosession = <async_generator object aiosession at 0x7fcefc22e400>
4 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.scanner.tests.test_client::test_client_known_correct_api_request
mock_aioresponse = <aioresponses.core.aioresponses object at 0x7fcefc2a3390> event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> aiosession = <async_generator object aiosession at 0x7fcefc2a9510>
4 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.scanner.tests.test_client::test_client_known_raise_apierror
mock_aioresponse = <aioresponses.core.aioresponses object at 0x7fcefc284588> event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> aiosession = <async_generator object aiosession at 0x7fcefc2327b8>
9 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.scanner.tests.test_data::test_add_origin
event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> live_server = <[AttributeError("'LiveServer' object has no attribute 'url'") raised in repr()] LiveServer object at 0x7fcee6a6ada0> aiosession = <async_generator object aiosession at 0x7fcefc151950>
7 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.scanner.tests.test_policy::test_directory_priority_policy
live_server = <[AttributeError("'LiveServer' object has no attribute 'url'") raised in repr()] LiveServer object at 0x7fcee6a6ada0> aiosession = <async_generator object aiosession at 0x7fcefc2a9048> event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>
View Full Test Results (9 Failed · 33 Passed)

Event Timeline

Build has FAILED

Patch application report for D7787 (id=28120)

Rebasing onto 255a11833b...

Current branch diff-target is up to date.
Changes applied before test
commit 8e91f33823544a28cce33181f10fbcb9c8c61741
Author: Pratyush Desai <pratyush.desai@liberta.casa>
Date:   Mon May 9 12:13:54 2022 +0200

    add strict asyncio_mode in pytest.ini

Link to build: https://jenkins.softwareheritage.org/job/DTSCN/job/tests-on-diff/161/
See console output for more information: https://jenkins.softwareheritage.org/job/DTSCN/job/tests-on-diff/161/console

Harbormaster returned this revision to the author for changes because remote builds failed.May 9 2022, 12:44 PM
Harbormaster failed remote builds in B29188: Diff 28120!

The way pytest-asyncio markers and fixtures work are causing problems, please consider this Revision as moot for now till I find out how.

Attempt to use "auto" instead of "strict" for pytest_asyncio

Build is green

Patch application report for D7787 (id=28236)

Could not rebase; Attempt merge onto 255a11833b...

Updating 255a118..373fd48
Fast-forward
 pytest.ini | 2 ++
 1 file changed, 2 insertions(+)
Changes applied before test
commit 373fd480b481b647a77d801b4be43ef98aa0ae2a
Author: Pratyush Desai <pratyush.desai@liberta.casa>
Date:   Thu May 12 13:57:19 2022 +0200

    pytest-asio from strict to auto

commit 8e91f33823544a28cce33181f10fbcb9c8c61741
Author: Pratyush Desai <pratyush.desai@liberta.casa>
Date:   Mon May 9 12:13:54 2022 +0200

    add strict asyncio_mode in pytest.ini

See https://jenkins.softwareheritage.org/job/DTSCN/job/tests-on-diff/162/ for more details.

This revision is now accepted and ready to land.May 12 2022, 2:07 PM
This revision was automatically updated to reflect the committed changes.