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

Fix skipping tests requiring httptools #1538

Merged
merged 1 commit into from Jul 8, 2022
Merged

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Jun 24, 2022

The test suite currently skips some tests when httptools are missing.
However, there are more tests requiring it and they currently fail
if that is the case. Cover them with necessary skips as well.

Copy link
Sponsor Member

@Kludex Kludex left a comment

Choose a reason for hiding this comment

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

Can we follow the same style as test_http.py on test_logging.py?

HTTP_PROTOCOLS = [p for p in [H11Protocol, HttpToolsProtocol] if p is not None]

The test suite currently skips some tests when httptools are missing.
However, there are more tests requiring it and they currently fail
if that is the case.  Cover them with necessary skips as well.
@mgorny
Copy link
Contributor Author

mgorny commented Jul 1, 2022

This is much nicer. Thanks, done that!

tests/middleware/test_logging.py Show resolved Hide resolved
tests/protocols/test_http.py Show resolved Hide resolved
tests/middleware/test_logging.py Show resolved Hide resolved
@Kludex Kludex added this to the Version 0.19.0 milestone Jul 5, 2022
Copy link
Sponsor Member

@Kludex Kludex left a comment

Choose a reason for hiding this comment

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

@euri10 I'm fine with this already.

I'll let this in your hand. 🙏

tests/middleware/test_logging.py Show resolved Hide resolved
tests/middleware/test_logging.py Show resolved Hide resolved
@euri10
Copy link
Member

euri10 commented Jul 8, 2022

ok let's roll with this, thanks @mgorny and thanks for clarifications in the other PR, and thanks for packaging uvicorn :)

@mgorny
Copy link
Contributor Author

mgorny commented Jul 8, 2022

Thanks a lot!

@euri10 euri10 merged commit 7a2a174 into encode:master Jul 8, 2022
Kludex pushed a commit to sephioh/uvicorn that referenced this pull request Oct 29, 2022
The test suite currently skips some tests when httptools are missing.
However, there are more tests requiring it and they currently fail
if that is the case.  Cover them with necessary skips as well.
Kludex pushed a commit that referenced this pull request Oct 29, 2022
The test suite currently skips some tests when httptools are missing.
However, there are more tests requiring it and they currently fail
if that is the case.  Cover them with necessary skips as well.
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

3 participants