scrapy-splash
scrapy-splash copied to clipboard
Test cookie.path_specified == False
@kmike I’m extremely unsure about this change, I have no idea of the side effects it may have.
I am trying to add test coverage to https://codecov.io/gh/scrapy-plugins/scrapy-splash/src/master/scrapy_splash/cookies.py#L111
This change adds such coverage, and ensures that cookie_to_har(har_to_cookie(har_cookie)) == har_cookie
works if no path is specified.
On the other hand, setting /
as a default path comes from Requests, where it’s still used. Their implementation does have a difference that we lost when we simplified our code: they set path='/'
if the path
parameter is not received, but if path=None
is received that None
value is used instead; but I’m not sure if that is relevant to our use case, and it would not make cookie_to_har(har_to_cookie(har_cookie)) == har_cookie
work either.
Codecov Report
Merging #245 into master will increase coverage by
0.17%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## master #245 +/- ##
==========================================
+ Coverage 92.67% 92.84% +0.17%
==========================================
Files 9 9
Lines 587 587
Branches 118 118
==========================================
+ Hits 544 545 +1
Misses 21 21
+ Partials 22 21 -1
Impacted Files | Coverage Δ | |
---|---|---|
scrapy_splash/cookies.py | 100% <ø> (+2.04%) |
:arrow_up: |
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 e40ca4f...bd1bfd0. Read the comment docs.