Skip to content

match [*|attr!=value] like :not([*|attr=value]) - #216

Open
itecz26 wants to merge 1 commit into
scrapy:masterfrom
itecz26:wildcard-attrib-not-equal
Open

itecz26 wants to merge 1 commit into
scrapy:masterfrom
itecz26:wildcard-attrib-not-equal

Conversation

@itecz26

@itecz26 itecz26 commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

xpath_attrib() translates [*|label!=bar] to a node-set != comparison that is true when any matching attribute differs, so it matches <item a:label="bar" b:label="baz"/> even though the docs define [foo!=bar] as :not([foo=bar]) (and with i only the first attribute gets compared), so this builds it from the per-attribute equality predicate #207 added for the other operators.

@codecov

codecov Bot commented Oct 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.80%. Comparing base (6be624a) to head (0446a37).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #216   +/-   ##
=======================================
  Coverage   99.80%   99.80%           
=======================================
  Files           3        3           
  Lines        1002     1009    +7     
  Branches      166      168    +2     
=======================================
+ Hits         1000     1007    +7     
  Misses          1        1           
  Partials        1        1           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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