MCPcopy
hub / github.com/django/django / first_node

Function first_node

django/test/utils.py:693–700  ·  view source on GitHub ↗
(document)

Source from the content-addressed store, hash-verified

691 )
692
693 def first_node(document):
694 for node in document.childNodes:
695 if node.nodeType not in (
696 Node.COMMENT_NODE,
697 Node.DOCUMENT_TYPE_NODE,
698 Node.PROCESSING_INSTRUCTION_NODE,
699 ):
700 return node
701
702 want = want.strip().replace("\\n", "\n")
703 got = got.strip().replace("\\n", "\n")

Callers 1

compare_xmlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected