Conversation
Agent-Logs-Url: https://github.com/PoorHttp/PoorWSGI/sessions/4da95014-475b-4e6a-b9c5-c49a53c320bb Co-authored-by: ondratu <6469029+ondratu@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix URL normalization by using rstrip instead of strip
Fix URL normalization and fixture yield consistency in test_aes_session
May 2, 2026
Contributor
|
@copilot fix all integrity tests with the same approach |
Agent-Logs-Url: https://github.com/PoorHttp/PoorWSGI/sessions/38710ba9-3b36-428e-bc88-28e266a492ff Co-authored-by: ondratu <6469029+ondratu@users.noreply.github.com>
Contributor
Author
Done in e89a184. Applied the same approach to all remaining integrity tests:
Files updated: |
Copilot
AI
changed the title
Fix URL normalization and fixture yield consistency in test_aes_session
Fix URL normalization and fixture yield consistency in all integrity tests
May 2, 2026
ondratu
approved these changes
May 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The server fixture in multiple integrity test files had two issues:
strip('/')was stripping leading slashes from URLs (wrong for a base URL), and the fixture mixedreturnwithyield, making teardown unreachable in the early-exit branch.Changes
strip→rstrip: Only trailing slashes are removed from the environment-supplied URL, preserving any leading slashes.yieldin both branches: Replacedreturn valwithyield valinside anif/elseblock so pytest teardown always runs. Process teardown is guarded withif process is not None:to safely handle the no-server branch.# pylint: disable=inconsistent-return-statementsfrom all affected files.Affected files
tests_integrity/test_aes_session.pytests_integrity/test_digest.pytests_integrity/test_session.pytests_integrity/test_websocket.pytests_integrity/test_profile.pytests_integrity/test_json.pytests_integrity/test_simple.pytests_integrity/test_openapi.pytests_integrity/test_metrics.pyOriginal prompt