Public Member Functions | Static Public Attributes | Private Member Functions | List of all members
gtest_xml_test_utils.GTestXMLTestCase Class Reference
Inheritance diagram for gtest_xml_test_utils.GTestXMLTestCase:
Inheritance graph
[legend]

Public Member Functions

def AssertEquivalentNodes (self, expected_node, actual_node)
 
def AssertEquivalentNodes (self, expected_node, actual_node)
 
def AssertEquivalentNodes (self, expected_node, actual_node)
 
def AssertEquivalentNodes (self, expected_node, actual_node)
 
def AssertEquivalentNodes (self, expected_node, actual_node)
 
def NormalizeXml (self, element)
 
def NormalizeXml (self, element)
 
def NormalizeXml (self, element)
 
def NormalizeXml (self, element)
 
def NormalizeXml (self, element)
 

Static Public Attributes

dictionary identifying_attribute
 

Private Member Functions

def _GetChildren (self, element)
 
def _GetChildren (self, element)
 
def _GetChildren (self, element)
 
def _GetChildren (self, element)
 
def _GetChildren (self, element)
 

Detailed Description

Base class for tests of Google Test's XML output functionality.

Definition at line 38 of file bloaty/third_party/googletest/googletest/test/gtest_xml_test_utils.py.

Member Function Documentation

◆ _GetChildren() [1/5]

def gtest_xml_test_utils.GTestXMLTestCase._GetChildren (   self,
  element 
)
private
Fetches all of the child nodes of element, a DOM Element object.
Returns them as the values of a dictionary keyed by the IDs of the
children.  For <testsuites>, <testsuite>, <testcase>, and <property>
elements, the ID is the value of their "name" attribute; for <failure>
elements, it is the value of the "message" attribute; for <properties>
elements, it is the value of their parent's "name" attribute plus the
literal string "properties"; CDATA sections and non-whitespace
text nodes are concatenated into a single CDATA section with ID
"detail".  An exception is raised if any element other than the above
four is encountered, if two child elements with the same identifying
attributes are encountered, or if any other type of node is encountered.

Definition at line 111 of file bloaty/third_party/googletest/googletest/test/gtest_xml_test_utils.py.

◆ _GetChildren() [2/5]

def gtest_xml_test_utils.GTestXMLTestCase._GetChildren (   self,
  element 
)
private
Fetches all of the child nodes of element, a DOM Element object.
Returns them as the values of a dictionary keyed by the IDs of the
children.  For <testsuites>, <testsuite>, <testcase>, and <property>
elements, the ID is the value of their "name" attribute; for <failure>
elements, it is the value of the "message" attribute; for <properties>
elements, it is the value of their parent's "name" attribute plus the
literal string "properties"; CDATA sections and non-whitespace
text nodes are concatenated into a single CDATA section with ID
"detail".  An exception is raised if any element other than the above
four is encountered, if two child elements with the same identifying
attributes are encountered, or if any other type of node is encountered.

Definition at line 111 of file bloaty/third_party/protobuf/third_party/googletest/googletest/test/gtest_xml_test_utils.py.

◆ _GetChildren() [3/5]

def gtest_xml_test_utils.GTestXMLTestCase._GetChildren (   self,
  element 
)
private
Fetches all of the child nodes of element, a DOM Element object.
Returns them as the values of a dictionary keyed by the IDs of the
children.  For <testsuites>, <testsuite>, <testcase>, and <property>
elements, the ID is the value of their "name" attribute; for <failure>
elements, it is the value of the "message" attribute; for <properties>
elements, it is the value of their parent's "name" attribute plus the
literal string "properties"; CDATA sections and non-whitespace
text nodes are concatenated into a single CDATA section with ID
"detail".  An exception is raised if any element other than the above
four is encountered, if two child elements with the same identifying
attributes are encountered, or if any other type of node is encountered.

Definition at line 111 of file protobuf/third_party/googletest/googletest/test/gtest_xml_test_utils.py.

◆ _GetChildren() [4/5]

def gtest_xml_test_utils.GTestXMLTestCase._GetChildren (   self,
  element 
)
private
Fetches all of the child nodes of element, a DOM Element object.
Returns them as the values of a dictionary keyed by the IDs of the
children.  For <testsuites>, <testsuite>, <testcase>, and <property>
elements, the ID is the value of their "name" attribute; for <failure>
elements, it is the value of the "message" attribute; for <properties>
elements, it is the value of their parent's "name" attribute plus the
literal string "properties"; CDATA sections and non-whitespace
text nodes are concatenated into a single CDATA section with ID
"detail".  An exception is raised if any element other than the above
four is encountered, if two child elements with the same identifying
attributes are encountered, or if any other type of node is encountered.

Definition at line 112 of file boringssl-with-bazel/src/third_party/googletest/test/gtest_xml_test_utils.py.

◆ _GetChildren() [5/5]

def gtest_xml_test_utils.GTestXMLTestCase._GetChildren (   self,
  element 
)
private
Fetches all of the child nodes of element, a DOM Element object.
Returns them as the values of a dictionary keyed by the IDs of the
children.  For <testsuites>, <testsuite>, <testcase>, and <property>
elements, the ID is the value of their "name" attribute; for <failure>
elements, it is the value of the "message" attribute; for <properties>
elements, it is the value of their parent's "name" attribute plus the
literal string "properties"; CDATA sections and non-whitespace
text nodes are concatenated into a single CDATA section with ID
"detail".  An exception is raised if any element other than the above
four is encountered, if two child elements with the same identifying
attributes are encountered, or if any other type of node is encountered.

Definition at line 112 of file googletest/googletest/test/gtest_xml_test_utils.py.

◆ AssertEquivalentNodes() [1/5]

def gtest_xml_test_utils.GTestXMLTestCase.AssertEquivalentNodes (   self,
  expected_node,
  actual_node 
)
Asserts that actual_node (a DOM node object) is equivalent to
expected_node (another DOM node object), in that either both of
them are CDATA nodes and have the same value, or both are DOM
elements and actual_node meets all of the following conditions:

*  It has the same tag name as expected_node.
*  It has the same set of attributes as expected_node, each with
   the same value as the corresponding attribute of expected_node.
   Exceptions are any attribute named "time", which needs only be
   convertible to a floating-point number and any attribute named
   "type_param" which only has to be non-empty.
*  It has an equivalent set of child nodes (including elements and
   CDATA sections) as expected_node.  Note that we ignore the
   order of the children as they are not guaranteed to be in any
   particular order.

Definition at line 44 of file bloaty/third_party/googletest/googletest/test/gtest_xml_test_utils.py.

◆ AssertEquivalentNodes() [2/5]

def gtest_xml_test_utils.GTestXMLTestCase.AssertEquivalentNodes (   self,
  expected_node,
  actual_node 
)
Asserts that actual_node (a DOM node object) is equivalent to
expected_node (another DOM node object), in that either both of
them are CDATA nodes and have the same value, or both are DOM
elements and actual_node meets all of the following conditions:

*  It has the same tag name as expected_node.
*  It has the same set of attributes as expected_node, each with
   the same value as the corresponding attribute of expected_node.
   Exceptions are any attribute named "time", which needs only be
   convertible to a floating-point number and any attribute named
   "type_param" which only has to be non-empty.
*  It has an equivalent set of child nodes (including elements and
   CDATA sections) as expected_node.  Note that we ignore the
   order of the children as they are not guaranteed to be in any
   particular order.

Definition at line 44 of file bloaty/third_party/protobuf/third_party/googletest/googletest/test/gtest_xml_test_utils.py.

◆ AssertEquivalentNodes() [3/5]

def gtest_xml_test_utils.GTestXMLTestCase.AssertEquivalentNodes (   self,
  expected_node,
  actual_node 
)
Asserts that actual_node (a DOM node object) is equivalent to
expected_node (another DOM node object), in that either both of
them are CDATA nodes and have the same value, or both are DOM
elements and actual_node meets all of the following conditions:

*  It has the same tag name as expected_node.
*  It has the same set of attributes as expected_node, each with
   the same value as the corresponding attribute of expected_node.
   Exceptions are any attribute named "time", which needs only be
   convertible to a floating-point number and any attribute named
   "type_param" which only has to be non-empty.
*  It has an equivalent set of child nodes (including elements and
   CDATA sections) as expected_node.  Note that we ignore the
   order of the children as they are not guaranteed to be in any
   particular order.

Definition at line 44 of file googletest/googletest/test/gtest_xml_test_utils.py.

◆ AssertEquivalentNodes() [4/5]

def gtest_xml_test_utils.GTestXMLTestCase.AssertEquivalentNodes (   self,
  expected_node,
  actual_node 
)
Asserts that actual_node (a DOM node object) is equivalent to
expected_node (another DOM node object), in that either both of
them are CDATA nodes and have the same value, or both are DOM
elements and actual_node meets all of the following conditions:

*  It has the same tag name as expected_node.
*  It has the same set of attributes as expected_node, each with
   the same value as the corresponding attribute of expected_node.
   Exceptions are any attribute named "time", which needs only be
   convertible to a floating-point number and any attribute named
   "type_param" which only has to be non-empty.
*  It has an equivalent set of child nodes (including elements and
   CDATA sections) as expected_node.  Note that we ignore the
   order of the children as they are not guaranteed to be in any
   particular order.

Definition at line 44 of file protobuf/third_party/googletest/googletest/test/gtest_xml_test_utils.py.

◆ AssertEquivalentNodes() [5/5]

def gtest_xml_test_utils.GTestXMLTestCase.AssertEquivalentNodes (   self,
  expected_node,
  actual_node 
)
Asserts that actual_node (a DOM node object) is equivalent to
expected_node (another DOM node object), in that either both of
them are CDATA nodes and have the same value, or both are DOM
elements and actual_node meets all of the following conditions:

*  It has the same tag name as expected_node.
*  It has the same set of attributes as expected_node, each with
   the same value as the corresponding attribute of expected_node.
   Exceptions are any attribute named "time", which needs only be
   convertible to a floating-point number and any attribute named
   "type_param" which only has to be non-empty.
*  It has an equivalent set of child nodes (including elements and
   CDATA sections) as expected_node.  Note that we ignore the
   order of the children as they are not guaranteed to be in any
   particular order.

Definition at line 44 of file boringssl-with-bazel/src/third_party/googletest/test/gtest_xml_test_utils.py.

◆ NormalizeXml() [1/5]

def gtest_xml_test_utils.GTestXMLTestCase.NormalizeXml (   self,
  element 
)
Normalizes Google Test's XML output to eliminate references to transient
information that may change from run to run.

*  The "time" attribute of <testsuites>, <testsuite> and <testcase>
   elements is replaced with a single asterisk, if it contains
   only digit characters.
*  The "timestamp" attribute of <testsuites> elements is replaced with a
   single asterisk, if it contains a valid ISO8601 datetime value.
*  The "type_param" attribute of <testcase> elements is replaced with a
   single asterisk (if it sn non-empty) as it is the type name returned
   by the compiler and is platform dependent.
*  The line info reported in the first line of the "message"
   attribute and CDATA section of <failure> elements is replaced with the
   file's basename and a single asterisk for the line number.
*  The directory names in file paths are removed.
*  The stack traces are removed.

Definition at line 152 of file protobuf/third_party/googletest/googletest/test/gtest_xml_test_utils.py.

◆ NormalizeXml() [2/5]

def gtest_xml_test_utils.GTestXMLTestCase.NormalizeXml (   self,
  element 
)
Normalizes Google Test's XML output to eliminate references to transient
information that may change from run to run.

*  The "time" attribute of <testsuites>, <testsuite> and <testcase>
   elements is replaced with a single asterisk, if it contains
   only digit characters.
*  The "timestamp" attribute of <testsuites> elements is replaced with a
   single asterisk, if it contains a valid ISO8601 datetime value.
*  The "type_param" attribute of <testcase> elements is replaced with a
   single asterisk (if it sn non-empty) as it is the type name returned
   by the compiler and is platform dependent.
*  The line info reported in the first line of the "message"
   attribute and CDATA section of <failure> elements is replaced with the
   file's basename and a single asterisk for the line number.
*  The directory names in file paths are removed.
*  The stack traces are removed.

Definition at line 152 of file bloaty/third_party/protobuf/third_party/googletest/googletest/test/gtest_xml_test_utils.py.

◆ NormalizeXml() [3/5]

def gtest_xml_test_utils.GTestXMLTestCase.NormalizeXml (   self,
  element 
)
Normalizes Google Test's XML output to eliminate references to transient
information that may change from run to run.

*  The "time" attribute of <testsuites>, <testsuite> and <testcase>
   elements is replaced with a single asterisk, if it contains
   only digit characters.
*  The "timestamp" attribute of <testsuites> elements is replaced with a
   single asterisk, if it contains a valid ISO8601 datetime value.
*  The "type_param" attribute of <testcase> elements is replaced with a
   single asterisk (if it sn non-empty) as it is the type name returned
   by the compiler and is platform dependent.
*  The line info reported in the first line of the "message"
   attribute and CDATA section of <failure> elements is replaced with the
   file's basename and a single asterisk for the line number.
*  The directory names in file paths are removed.
*  The stack traces are removed.

Definition at line 152 of file bloaty/third_party/googletest/googletest/test/gtest_xml_test_utils.py.

◆ NormalizeXml() [4/5]

def gtest_xml_test_utils.GTestXMLTestCase.NormalizeXml (   self,
  element 
)
Normalizes Google Test's XML output to eliminate references to transient
information that may change from run to run.

*  The "time" attribute of <testsuites>, <testsuite> and <testcase>
   elements is replaced with a single asterisk, if it contains
   only digit characters.
*  The "timestamp" attribute of <testsuites> elements is replaced with a
   single asterisk, if it contains a valid ISO8601 datetime value.
*  The "type_param" attribute of <testcase> elements is replaced with a
   single asterisk (if it sn non-empty) as it is the type name returned
   by the compiler and is platform dependent.
*  The line info reported in the first line of the "message"
   attribute and CDATA section of <failure> elements is replaced with the
   file's basename and a single asterisk for the line number.
*  The directory names in file paths are removed.
*  The stack traces are removed.

Definition at line 153 of file boringssl-with-bazel/src/third_party/googletest/test/gtest_xml_test_utils.py.

◆ NormalizeXml() [5/5]

def gtest_xml_test_utils.GTestXMLTestCase.NormalizeXml (   self,
  element 
)
Normalizes Google Test's XML output to eliminate references to transient
information that may change from run to run.

*  The "time" attribute of <testsuites>, <testsuite> and <testcase>
   elements is replaced with a single asterisk, if it contains
   only digit characters.
*  The "timestamp" attribute of <testsuites> elements is replaced with a
   single asterisk, if it contains a valid ISO8601 datetime value.
*  The "type_param" attribute of <testcase> elements is replaced with a
   single asterisk (if it sn non-empty) as it is the type name returned
   by the compiler and is platform dependent.
*  The line info reported in the first line of the "message"
   attribute and CDATA section of <failure> elements is replaced with the
   file's basename and a single asterisk for the line number.
*  The directory names in file paths are removed.
*  The stack traces are removed.

Definition at line 153 of file googletest/googletest/test/gtest_xml_test_utils.py.

Member Data Documentation

◆ identifying_attribute

dictionary gtest_xml_test_utils.GTestXMLTestCase.identifying_attribute
static
Initial value:
= {
'testsuites': 'name',
'testsuite': 'name',
'testcase': 'name',
'failure': 'message',
'property': 'name',
}

Definition at line 103 of file bloaty/third_party/googletest/googletest/test/gtest_xml_test_utils.py.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:40