Skip to content
Snippets Groups Projects
Commit d5c9d3e8 authored by Ladislav Lhotka's avatar Ladislav Lhotka
Browse files

Define canonical string for empty type as ''.

parent 0799dc43
No related branches found
No related tags found
No related merge requests found
......@@ -334,6 +334,7 @@ def test_xpath(instance):
xptest("count(child::llistB/following-sibling::*)", 1)
xptest("leafA <= leafB", node=conta)
xptest("leafB mod leafA", 1, node=conta)
xptest("listA/contD/contE/leafJ = ''", node=conta)
xptest("""listA[leafE='C0FFEE' ][ leafF = 'true']
/contD/contE/leafP = 54""", node=conta)
xptest("listA/contD/contE/leafP < leafA | leafB", node=conta)
......
......@@ -215,6 +215,9 @@ class EmptyType(DataType):
cls._instance = super(EmptyType, cls).__new__(cls)
return cls._instance
def canonical_string(self, val: Tuple[None]) -> str:
return ""
def _constraints(self, val: Tuple[None]) -> bool:
return val == (None,)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment