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

Add more URL subtraction coverage #1389

Merged
merged 1 commit into from
Oct 25, 2024
Merged

Add more URL subtraction coverage #1389

merged 1 commit into from
Oct 25, 2024

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Oct 25, 2024

#1388 will remove PurePath and replace it with an internal helper, however there are still some cases that are not correct that will need to be addressed. To ensure future refactoring does not cause regressions, add more coverage.

@bdraco bdraco added the bot:chronographer:skip This PR does not need to include a change note label Oct 25, 2024
Copy link

codspeed-hq bot commented Oct 25, 2024

CodSpeed Performance Report

Merging #1389 will not alter performance

Comparing subtract_tests (826d790) with master (7a272d2)

Summary

✅ 85 untouched benchmarks

@commonism
Copy link
Contributor

diff --git a/tests/test_url.py b/tests/test_url.py
index e2bcac7..7b86b55 100644
--- a/tests/test_url.py
+++ b/tests/test_url.py
@@ -69,7 +69,12 @@ def test_str():
         (
             "http://example.com/////path/////to",
             "http://example.com/////spam",
-            "path/to",
+            "path/////to",
+        ),
+        (
+                "http://example.com////path/////to",
+                "http://example.com/////spam",
+                "..//path/////to",
         ),
         ("http://example.com/this/is/a/test", "http://example.com/this/", "is/a/test"),
         (

@bdraco bdraco marked this pull request as ready for review October 25, 2024 09:39
Copy link

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.06%. Comparing base (7a272d2) to head (826d790).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1389   +/-   ##
=======================================
  Coverage   96.06%   96.06%           
=======================================
  Files          31       31           
  Lines        5767     5774    +7     
  Branches      361      361           
=======================================
+ Hits         5540     5547    +7     
  Misses        201      201           
  Partials       26       26           
Flag Coverage Δ
CI-GHA 96.06% <100.00%> (+<0.01%) ⬆️
MyPy 46.14% <100.00%> (+0.06%) ⬆️
OS-Linux 99.55% <100.00%> (+<0.01%) ⬆️
OS-Windows 99.61% <100.00%> (+<0.01%) ⬆️
OS-macOS 99.30% <100.00%> (+<0.01%) ⬆️
Py-3.10.11 99.27% <100.00%> (+<0.01%) ⬆️
Py-3.10.15 99.51% <100.00%> (+<0.01%) ⬆️
Py-3.11.10 99.51% <100.00%> (+<0.01%) ⬆️
Py-3.11.9 99.27% <100.00%> (+<0.01%) ⬆️
Py-3.12.7 99.51% <100.00%> (+<0.01%) ⬆️
Py-3.13.0 99.51% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 99.23% <100.00%> (+<0.01%) ⬆️
Py-3.9.20 99.47% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.16 99.52% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.17 99.55% <100.00%> (+<0.01%) ⬆️
VM-macos-latest 99.30% <100.00%> (+<0.01%) ⬆️
VM-ubuntu-latest 99.55% <100.00%> (+<0.01%) ⬆️
VM-windows-latest 99.61% <100.00%> (+<0.01%) ⬆️
pytest 99.55% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bdraco bdraco merged commit f0b8db7 into master Oct 25, 2024
44 of 46 checks passed
@bdraco bdraco deleted the subtract_tests branch October 25, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:skip This PR does not need to include a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants