@@ -162,6 +162,11 @@ def test_descendants_value(self):
162162 ('foo..baz' , {'foo' : [{'baz' : 1 }, {'baz' : 2 }]}, [1 , 2 ] ),
163163 ])
164164
165+ def test_union_value (self ):
166+ self .check_cases ([
167+ ('foo | bar' , {'foo' : 1 , 'bar' : 2 }, [1 , 2 ])
168+ ])
169+
165170 def test_parent_value (self ):
166171 self .check_cases ([('foo.baz.`parent`' , {'foo' : {'baz' : 3 }}, [{'baz' : 3 }]),
167172 ('foo.`parent`.foo.baz.`parent`.baz.bizzle' , {'foo' : {'baz' : {'bizzle' : 5 }}}, [5 ])])
@@ -328,6 +333,11 @@ def test_update_child(self):
328333 ({'foo' : {'bar' : 1 }}, 'foo.bar' , 'baz' , {'foo' : {'bar' : 'baz' }})
329334 ])
330335
336+ def test_update_union (self ):
337+ self .check_update_cases ([
338+ ({'foo' : 1 , 'bar' : 2 }, 'foo | bar' , 3 , {'foo' : 3 , 'bar' : 3 })
339+ ])
340+
331341 def test_update_where (self ):
332342 self .check_update_cases ([
333343 ({'foo' : {'bar' : {'baz' : 1 }}, 'bar' : {'baz' : 2 }},
@@ -426,6 +436,12 @@ def test_delete_descendants_where(self):
426436 {'foo' : {'flag' : 1 }, 'baz' : {'bar' : 2 }})
427437 ])
428438
439+ def test_delete_union (self ):
440+ self .check_delete_cases ([
441+ ({'foo' : 1 , 'bar' : 2 }, 'foo | bar' , {}),
442+ ({'foo' : 1 , 'bar' : 2 , 'baz' : 3 }, 'foo | bar' , {'baz' : 3 }),
443+ ])
444+
429445 def test_delete_index (self ):
430446 self .check_delete_cases ([
431447 ([42 ], '[0]' , []),
0 commit comments