Skip to content

Commit f35898d

Browse files
committed
add xml.etree.elementree
1 parent e747ca1 commit f35898d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

codeflash/verification/comparator.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import types
1414
import warnings
1515
import weakref
16+
import xml.etree.ElementTree as ET
1617
from collections import ChainMap, OrderedDict, deque
1718
from importlib.util import find_spec
1819
from typing import Any, Optional
@@ -633,6 +634,8 @@ def comparator(orig: Any, new: Any, superset_obj: bool = False) -> bool:
633634

634635
if type(orig) in {types.BuiltinFunctionType, types.BuiltinMethodType}:
635636
return new == orig
637+
if isinstance(orig, ET.Element):
638+
return isinstance(new, ET.Element) and ET.tostring(orig) == ET.tostring(new)
636639
if isinstance(
637640
orig,
638641
(

0 commit comments

Comments
 (0)