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 Test Cases: test_http for Py3.9+, test_json_response_json for ujson 5.4.0+, and test_zero_downtime; Test Case Type Annotations #2504

Merged
merged 5 commits into from
Jul 24, 2022

Conversation

ChihweiLHBird
Copy link
Member

@ChihweiLHBird ChihweiLHBird commented Jul 20, 2022

The test case was fixed.

@ChihweiLHBird ChihweiLHBird requested a review from a team as a code owner July 20, 2022 21:35
@codecov
Copy link

codecov bot commented Jul 20, 2022

Codecov Report

Merging #2504 (1701d4c) into main (4429e76) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main     #2504   +/-   ##
=========================================
  Coverage   87.342%   87.342%           
=========================================
  Files           69        69           
  Lines         5554      5554           
  Branches       966       966           
=========================================
  Hits          4851      4851           
  Misses         510       510           
  Partials       193       193           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4429e76...1701d4c. Read the comment docs.

@ChihweiLHBird ChihweiLHBird changed the title Fix test_http for Py3.9+ Fix Test Cases: test_http for Py3.9+ and test_json_response_json for ujson > 5.4.0 Jul 21, 2022
@ChihweiLHBird ChihweiLHBird changed the title Fix Test Cases: test_http for Py3.9+ and test_json_response_json for ujson > 5.4.0 Fix Test Cases: test_http for Py3.9+ and test_json_response_json for ujson 5.4.0+ Jul 21, 2022
tests/test_json_encoding.py Outdated Show resolved Hide resolved
@ChihweiLHBird ChihweiLHBird requested a review from ahopkins July 21, 2022 15:28
@ChihweiLHBird ChihweiLHBird changed the title Fix Test Cases: test_http for Py3.9+ and test_json_response_json for ujson 5.4.0+ Fix Test Cases: test_http for Py3.9+, test_json_response_json for ujson 5.4.0+, and test_zero_downtime Jul 22, 2022
@ChihweiLHBird ChihweiLHBird changed the title Fix Test Cases: test_http for Py3.9+, test_json_response_json for ujson 5.4.0+, and test_zero_downtime Fix Test Cases: test_http for Py3.9+, test_json_response_json for ujson 5.4.0+, and test_zero_downtime; Test Case Type Annotations Jul 22, 2022
@@ -75,7 +84,13 @@ def test_json_response_ujson(payload):
json(payload)


@pytest.mark.skipif(NO_UJSON is True, reason="ujson not installed")
@pytest.mark.skipif(
Copy link
Member

Choose a reason for hiding this comment

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

We are going need to rethink this test. But will merge it for now.

return text(f"{request.conn_info.server}")


async def client(app, loop):
async def client(app: Sanic, loop: AbstractEventLoop):
Copy link
Member

Choose a reason for hiding this comment

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

There really is no reason to start annotating all of these. Especially those embedded handlers.

@ahopkins ahopkins merged commit 8f6c87c into main Jul 24, 2022
@ahopkins ahopkins deleted the zhiwei/fix-test-http branch July 24, 2022 19:07
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