Skip to content

Commit

Permalink
test: Revert schematron related test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
abelcheung committed Mar 29, 2024
1 parent 28d19c1 commit 432745d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
17 changes: 0 additions & 17 deletions test-stub/test-mypy-bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,3 @@
el.tag = b
el.text = b
el.tail = b
# original test: test-validator.yml::superclass_validate_method
# Mypy failed to match _Element or _ElementTree against TypeVar
# with bound and default type value
# And somehow this only appeared for Schematron but not other
# validators
# Besides, pyright just works
- case: mypy_not_matching_pep696
expect_fail: true
main: |
from lxml.isoschematron import Schematron
from lxml.etree import _Element, _ElementTree
sch: Schematron
elem: _Element
tree: _ElementTree
reveal_type(sch(elem)) # NR: .+ "[\w\.]+\.bool"$
reveal_type(sch(tree)) # NR: .+ "[\w\.]+\.bool"$
2 changes: 1 addition & 1 deletion test-stub/test-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
- obj: rng
- obj: dtd
- obj: schema
# - obj: tron # see mypy_not_matching_pep696 test
- obj: tron
main: |
from inc import rng, dtd, schema, tron, tree, elem
reveal_type({{ obj }}(tree)) # NR: .+ "[\w\.]+\.bool"$
Expand Down

0 comments on commit 432745d

Please sign in to comment.