Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pytest.skip no longer works in twisted.trial unittests #12467

Description

@wRAR

Scrapy currently uses the pytest test runner but uses twisted.trial for async test cases. We are calling pytest.skip() to skip tests and it worked until the Twisted 25.5.0 release, now it instead produces an unhandled exception:

FAILED [100%]
tests/test_downloader_handler_twisted_http10.py:41 (TestHttp10Proxy.test_download_with_proxy_https_timeout)
Not implemented

During handling of the above exception, another exception occurred:
'NoneType' object is not iterable

During handling of the above exception, another exception occurred:
NOTE: Incompatible Exception Representation, displaying natively:

Skipped: Not implemented

I assume from the output that previously the _pytest.outcomes.Skipped exception was simply bubbled up while now some exception handling code fails to handle/propagate it with a "'NoneType' object is not iterable" exception but I haven't checked any code related to this.

Is this an unintended regression or should we not do this?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions