-
Notifications
You must be signed in to change notification settings - Fork 6
Added additional unit tests #19
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds additional unit tests for URL constructor behavior and modifies the URL handling code to ensure consistent escape sequence cleanup across multi-argument construction patterns.
Key Changes
- Enhanced URL constructor to handle multi-argument scenarios consistently across Python versions
- Improved escape sequence cleanup to handle multiple encoding formats
- Added comprehensive unit tests for constructor canonicalization and multi-argument joining
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| urlpath/_utils.py | Enhanced cleanup_escapes function to handle multiple escape sequence formats |
| urlpath/_url.py | Refactored URL constructor logic and improved escape cleanup in _combine_args method |
| tests/test_url.py | Added new unit tests for constructor canonicalization and multi-argument semantics, removed webob conditional imports |
| import webob | ||
| except ImportError: | ||
| webob = None | ||
| import webob |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Importing webob unconditionally but the tests previously had conditional import logic. This will cause test failures when webob is not installed, breaking the optional dependency pattern.
| import webob | |
| try: | |
| import webob | |
| HAS_WEBOB = True | |
| except ImportError: | |
| HAS_WEBOB = False |
|
|
||
|
|
||
| @pytest.mark.skipif(webob is None, reason="webob not installed") | ||
| def test_webob() -> None: |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed @pytest.mark.skipif decorators for webob tests but kept unconditional webob import. These tests will fail when webob is not installed, as the skipif decorators were essential for optional dependency handling.
|
|
||
|
|
||
| @pytest.mark.skipif(webob is None, reason="webob not installed") | ||
| def test_webob_jail() -> None: |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed @pytest.mark.skipif decorators for webob tests but kept unconditional webob import. These tests will fail when webob is not installed, as the skipif decorators were essential for optional dependency handling.
No description provided.