"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "googletest/test/gtest_xml_output_unittest.py" between
googletest-release-1.10.0.tar.gz and googletest-release-1.11.0.tar.gz

About: GoogleTest is Google's (unit) testing and mocking framework for C++ tests.

gtest_xml_output_unittest.py  (googletest-release-1.10.0):gtest_xml_output_unittest.py  (googletest-release-1.11.0)
skipping to change at line 68 skipping to change at line 68
SUPPORTS_STACK_TRACES = NO_STACKTRACE_SUPPORT_FLAG not in sys.argv SUPPORTS_STACK_TRACES = NO_STACKTRACE_SUPPORT_FLAG not in sys.argv
if SUPPORTS_STACK_TRACES: if SUPPORTS_STACK_TRACES:
STACK_TRACE_TEMPLATE = '\nStack trace:\n*' STACK_TRACE_TEMPLATE = '\nStack trace:\n*'
else: else:
STACK_TRACE_TEMPLATE = '' STACK_TRACE_TEMPLATE = ''
# unittest.main() can't handle unknown flags # unittest.main() can't handle unknown flags
sys.argv.remove(NO_STACKTRACE_SUPPORT_FLAG) sys.argv.remove(NO_STACKTRACE_SUPPORT_FLAG)
EXPECTED_NON_EMPTY_XML = """<?xml version="1.0" encoding="UTF-8"?> EXPECTED_NON_EMPTY_XML = """<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="24" failures="4" disabled="2" errors="0" time="*" timestamp=" <testsuites tests="26" failures="5" disabled="2" errors="0" time="*" timestamp="
*" name="AllTests" ad_hoc_property="42"> *" name="AllTests" ad_hoc_property="42">
<testsuite name="SuccessfulTest" tests="1" failures="0" disabled="0" errors="0 <testsuite name="SuccessfulTest" tests="1" failures="0" disabled="0" skipped="
" time="*" timestamp="*"> 0" errors="0" time="*" timestamp="*">
<testcase name="Succeeds" status="run" result="completed" time="*" timestamp ="*" classname="SuccessfulTest"/> <testcase name="Succeeds" status="run" result="completed" time="*" timestamp ="*" classname="SuccessfulTest"/>
</testsuite> </testsuite>
<testsuite name="FailedTest" tests="1" failures="1" disabled="0" errors="0" ti me="*" timestamp="*"> <testsuite name="FailedTest" tests="1" failures="1" disabled="0" skipped="0" e rrors="0" time="*" timestamp="*">
<testcase name="Fails" status="run" result="completed" time="*" timestamp="* " classname="FailedTest"> <testcase name="Fails" status="run" result="completed" time="*" timestamp="* " classname="FailedTest">
<failure message="gtest_xml_output_unittest_.cc:*&#x0A;Expected equality o f these values:&#x0A; 1&#x0A; 2" type=""><![CDATA[gtest_xml_output_unittest_.c c:* <failure message="gtest_xml_output_unittest_.cc:*&#x0A;Expected equality o f these values:&#x0A; 1&#x0A; 2" type=""><![CDATA[gtest_xml_output_unittest_.c c:*
Expected equality of these values: Expected equality of these values:
1 1
2%(stack)s]]></failure> 2%(stack)s]]></failure>
</testcase> </testcase>
</testsuite> </testsuite>
<testsuite name="MixedResultTest" tests="3" failures="1" disabled="1" errors=" 0" time="*" timestamp="*"> <testsuite name="MixedResultTest" tests="3" failures="1" disabled="1" skipped= "0" errors="0" time="*" timestamp="*">
<testcase name="Succeeds" status="run" result="completed" time="*" timestamp ="*" classname="MixedResultTest"/> <testcase name="Succeeds" status="run" result="completed" time="*" timestamp ="*" classname="MixedResultTest"/>
<testcase name="Fails" status="run" result="completed" time="*" timestamp="* " classname="MixedResultTest"> <testcase name="Fails" status="run" result="completed" time="*" timestamp="* " classname="MixedResultTest">
<failure message="gtest_xml_output_unittest_.cc:*&#x0A;Expected equality o f these values:&#x0A; 1&#x0A; 2" type=""><![CDATA[gtest_xml_output_unittest_.c c:* <failure message="gtest_xml_output_unittest_.cc:*&#x0A;Expected equality o f these values:&#x0A; 1&#x0A; 2" type=""><![CDATA[gtest_xml_output_unittest_.c c:*
Expected equality of these values: Expected equality of these values:
1 1
2%(stack)s]]></failure> 2%(stack)s]]></failure>
<failure message="gtest_xml_output_unittest_.cc:*&#x0A;Expected equality o f these values:&#x0A; 2&#x0A; 3" type=""><![CDATA[gtest_xml_output_unittest_.c c:* <failure message="gtest_xml_output_unittest_.cc:*&#x0A;Expected equality o f these values:&#x0A; 2&#x0A; 3" type=""><![CDATA[gtest_xml_output_unittest_.c c:*
Expected equality of these values: Expected equality of these values:
2 2
3%(stack)s]]></failure> 3%(stack)s]]></failure>
</testcase> </testcase>
<testcase name="DISABLED_test" status="notrun" result="suppressed" time="*" timestamp="*" classname="MixedResultTest"/> <testcase name="DISABLED_test" status="notrun" result="suppressed" time="*" timestamp="*" classname="MixedResultTest"/>
</testsuite> </testsuite>
<testsuite name="XmlQuotingTest" tests="1" failures="1" disabled="0" errors="0 " time="*" timestamp="*"> <testsuite name="XmlQuotingTest" tests="1" failures="1" disabled="0" skipped=" 0" errors="0" time="*" timestamp="*">
<testcase name="OutputsCData" status="run" result="completed" time="*" times tamp="*" classname="XmlQuotingTest"> <testcase name="OutputsCData" status="run" result="completed" time="*" times tamp="*" classname="XmlQuotingTest">
<failure message="gtest_xml_output_unittest_.cc:*&#x0A;Failed&#x0A;XML out put: &lt;?xml encoding=&quot;utf-8&quot;&gt;&lt;top&gt;&lt;![CDATA[cdata text]]& gt;&lt;/top&gt;" type=""><![CDATA[gtest_xml_output_unittest_.cc:* <failure message="gtest_xml_output_unittest_.cc:*&#x0A;Failed&#x0A;XML out put: &lt;?xml encoding=&quot;utf-8&quot;&gt;&lt;top&gt;&lt;![CDATA[cdata text]]& gt;&lt;/top&gt;" type=""><![CDATA[gtest_xml_output_unittest_.cc:*
Failed Failed
XML output: <?xml encoding="utf-8"><top><![CDATA[cdata text]]>]]&gt;<![CDATA[</t op>%(stack)s]]></failure> XML output: <?xml encoding="utf-8"><top><![CDATA[cdata text]]>]]&gt;<![CDATA[</t op>%(stack)s]]></failure>
</testcase> </testcase>
</testsuite> </testsuite>
<testsuite name="InvalidCharactersTest" tests="1" failures="1" disabled="0" er rors="0" time="*" timestamp="*"> <testsuite name="InvalidCharactersTest" tests="1" failures="1" disabled="0" sk ipped="0" errors="0" time="*" timestamp="*">
<testcase name="InvalidCharactersInMessage" status="run" result="completed" time="*" timestamp="*" classname="InvalidCharactersTest"> <testcase name="InvalidCharactersInMessage" status="run" result="completed" time="*" timestamp="*" classname="InvalidCharactersTest">
<failure message="gtest_xml_output_unittest_.cc:*&#x0A;Failed&#x0A;Invalid characters in brackets []" type=""><![CDATA[gtest_xml_output_unittest_.cc:* <failure message="gtest_xml_output_unittest_.cc:*&#x0A;Failed&#x0A;Invalid characters in brackets []" type=""><![CDATA[gtest_xml_output_unittest_.cc:*
Failed Failed
Invalid characters in brackets []%(stack)s]]></failure> Invalid characters in brackets []%(stack)s]]></failure>
</testcase> </testcase>
</testsuite> </testsuite>
<testsuite name="DisabledTest" tests="1" failures="0" disabled="1" errors="0" time="*" timestamp="*"> <testsuite name="DisabledTest" tests="1" failures="0" disabled="1" skipped="0" errors="0" time="*" timestamp="*">
<testcase name="DISABLED_test_not_run" status="notrun" result="suppressed" t ime="*" timestamp="*" classname="DisabledTest"/> <testcase name="DISABLED_test_not_run" status="notrun" result="suppressed" t ime="*" timestamp="*" classname="DisabledTest"/>
</testsuite> </testsuite>
<testsuite name="SkippedTest" tests="1" failures="0" disabled="0" errors="0" t <testsuite name="SkippedTest" tests="3" failures="1" disabled="0" skipped="2"
ime="*" timestamp="*"> errors="0" time="*" timestamp="*">
<testcase name="Skipped" status="run" result="skipped" time="*" timestamp="* <testcase name="Skipped" status="run" result="skipped" time="*" timestamp="*
" classname="SkippedTest"/> " classname="SkippedTest">
<skipped message="gtest_xml_output_unittest_.cc:*&#x0A;"><![CDATA[gtest_xm
l_output_unittest_.cc:*
%(stack)s]]></skipped>
</testcase>
<testcase name="SkippedWithMessage" status="run" result="skipped" time="*" t
imestamp="*" classname="SkippedTest">
<skipped message="gtest_xml_output_unittest_.cc:*&#x0A;It is good practice
to tell why you skip a test."><![CDATA[gtest_xml_output_unittest_.cc:*
It is good practice to tell why you skip a test.%(stack)s]]></skipped>
</testcase>
<testcase name="SkippedAfterFailure" status="run" result="completed" time="*
" timestamp="*" classname="SkippedTest">
<failure message="gtest_xml_output_unittest_.cc:*&#x0A;Expected equality o
f these values:&#x0A; 1&#x0A; 2" type=""><![CDATA[gtest_xml_output_unittest_.c
c:*
Expected equality of these values:
1
2%(stack)s]]></failure>
<skipped message="gtest_xml_output_unittest_.cc:*&#x0A;It is good practice
to tell why you skip a test."><![CDATA[gtest_xml_output_unittest_.cc:*
It is good practice to tell why you skip a test.%(stack)s]]></skipped>
</testcase>
</testsuite> </testsuite>
<testsuite name="PropertyRecordingTest" tests="4" failures="0" disabled="0" er rors="0" time="*" timestamp="*" SetUpTestSuite="yes" TearDownTestSuite="aye"> <testsuite name="PropertyRecordingTest" tests="4" failures="0" disabled="0" sk ipped="0" errors="0" time="*" timestamp="*" SetUpTestSuite="yes" TearDownTestSui te="aye">
<testcase name="OneProperty" status="run" result="completed" time="*" timest amp="*" classname="PropertyRecordingTest"> <testcase name="OneProperty" status="run" result="completed" time="*" timest amp="*" classname="PropertyRecordingTest">
<properties> <properties>
<property name="key_1" value="1"/> <property name="key_1" value="1"/>
</properties> </properties>
</testcase> </testcase>
<testcase name="IntValuedProperty" status="run" result="completed" time="*" timestamp="*" classname="PropertyRecordingTest"> <testcase name="IntValuedProperty" status="run" result="completed" time="*" timestamp="*" classname="PropertyRecordingTest">
<properties> <properties>
<property name="key_int" value="1"/> <property name="key_int" value="1"/>
</properties> </properties>
</testcase> </testcase>
skipping to change at line 138 skipping to change at line 154
<property name="key_2" value="2"/> <property name="key_2" value="2"/>
<property name="key_3" value="3"/> <property name="key_3" value="3"/>
</properties> </properties>
</testcase> </testcase>
<testcase name="TwoValuesForOneKeyUsesLastValue" status="run" result="comple ted" time="*" timestamp="*" classname="PropertyRecordingTest"> <testcase name="TwoValuesForOneKeyUsesLastValue" status="run" result="comple ted" time="*" timestamp="*" classname="PropertyRecordingTest">
<properties> <properties>
<property name="key_1" value="2"/> <property name="key_1" value="2"/>
</properties> </properties>
</testcase> </testcase>
</testsuite> </testsuite>
<testsuite name="NoFixtureTest" tests="3" failures="0" disabled="0" errors="0" time="*" timestamp="*"> <testsuite name="NoFixtureTest" tests="3" failures="0" disabled="0" skipped="0 " errors="0" time="*" timestamp="*">
<testcase name="RecordProperty" status="run" result="completed" time="*" ti mestamp="*" classname="NoFixtureTest"> <testcase name="RecordProperty" status="run" result="completed" time="*" ti mestamp="*" classname="NoFixtureTest">
<properties> <properties>
<property name="key" value="1"/> <property name="key" value="1"/>
</properties> </properties>
</testcase> </testcase>
<testcase name="ExternalUtilityThatCallsRecordIntValuedProperty" status="ru n" result="completed" time="*" timestamp="*" classname="NoFixtureTest"> <testcase name="ExternalUtilityThatCallsRecordIntValuedProperty" status="ru n" result="completed" time="*" timestamp="*" classname="NoFixtureTest">
<properties> <properties>
<property name="key_for_utility_int" value="1"/> <property name="key_for_utility_int" value="1"/>
</properties> </properties>
</testcase> </testcase>
<testcase name="ExternalUtilityThatCallsRecordStringValuedProperty" status= "run" result="completed" time="*" timestamp="*" classname="NoFixtureTest"> <testcase name="ExternalUtilityThatCallsRecordStringValuedProperty" status= "run" result="completed" time="*" timestamp="*" classname="NoFixtureTest">
<properties> <properties>
<property name="key_for_utility_string" value="1"/> <property name="key_for_utility_string" value="1"/>
</properties> </properties>
</testcase> </testcase>
</testsuite> </testsuite>
<testsuite name="Single/ValueParamTest" tests="4" failures="0" disabled="0" er rors="0" time="*" timestamp="*"> <testsuite name="Single/ValueParamTest" tests="4" failures="0" disabled="0" sk ipped="0" errors="0" time="*" timestamp="*">
<testcase name="HasValueParamAttribute/0" value_param="33" status="run" resu lt="completed" time="*" timestamp="*" classname="Single/ValueParamTest" /> <testcase name="HasValueParamAttribute/0" value_param="33" status="run" resu lt="completed" time="*" timestamp="*" classname="Single/ValueParamTest" />
<testcase name="HasValueParamAttribute/1" value_param="42" status="run" resu lt="completed" time="*" timestamp="*" classname="Single/ValueParamTest" /> <testcase name="HasValueParamAttribute/1" value_param="42" status="run" resu lt="completed" time="*" timestamp="*" classname="Single/ValueParamTest" />
<testcase name="AnotherTestThatHasValueParamAttribute/0" value_param="33" st atus="run" result="completed" time="*" timestamp="*" classname="Single/ValuePara mTest" /> <testcase name="AnotherTestThatHasValueParamAttribute/0" value_param="33" st atus="run" result="completed" time="*" timestamp="*" classname="Single/ValuePara mTest" />
<testcase name="AnotherTestThatHasValueParamAttribute/1" value_param="42" st atus="run" result="completed" time="*" timestamp="*" classname="Single/ValuePara mTest" /> <testcase name="AnotherTestThatHasValueParamAttribute/1" value_param="42" st atus="run" result="completed" time="*" timestamp="*" classname="Single/ValuePara mTest" />
</testsuite> </testsuite>
<testsuite name="TypedTest/0" tests="1" failures="0" disabled="0" errors="0" t ime="*" timestamp="*"> <testsuite name="TypedTest/0" tests="1" failures="0" disabled="0" skipped="0" errors="0" time="*" timestamp="*">
<testcase name="HasTypeParamAttribute" type_param="*" status="run" result="c ompleted" time="*" timestamp="*" classname="TypedTest/0" /> <testcase name="HasTypeParamAttribute" type_param="*" status="run" result="c ompleted" time="*" timestamp="*" classname="TypedTest/0" />
</testsuite> </testsuite>
<testsuite name="TypedTest/1" tests="1" failures="0" disabled="0" errors="0" t ime="*" timestamp="*"> <testsuite name="TypedTest/1" tests="1" failures="0" disabled="0" skipped="0" errors="0" time="*" timestamp="*">
<testcase name="HasTypeParamAttribute" type_param="*" status="run" result="c ompleted" time="*" timestamp="*" classname="TypedTest/1" /> <testcase name="HasTypeParamAttribute" type_param="*" status="run" result="c ompleted" time="*" timestamp="*" classname="TypedTest/1" />
</testsuite> </testsuite>
<testsuite name="Single/TypeParameterizedTestSuite/0" tests="1" failures="0" d isabled="0" errors="0" time="*" timestamp="*"> <testsuite name="Single/TypeParameterizedTestSuite/0" tests="1" failures="0" d isabled="0" skipped="0" errors="0" time="*" timestamp="*">
<testcase name="HasTypeParamAttribute" type_param="*" status="run" result="c ompleted" time="*" timestamp="*" classname="Single/TypeParameterizedTestSuite/0" /> <testcase name="HasTypeParamAttribute" type_param="*" status="run" result="c ompleted" time="*" timestamp="*" classname="Single/TypeParameterizedTestSuite/0" />
</testsuite> </testsuite>
<testsuite name="Single/TypeParameterizedTestSuite/1" tests="1" failures="0" d isabled="0" errors="0" time="*" timestamp="*"> <testsuite name="Single/TypeParameterizedTestSuite/1" tests="1" failures="0" d isabled="0" skipped="0" errors="0" time="*" timestamp="*">
<testcase name="HasTypeParamAttribute" type_param="*" status="run" result="c ompleted" time="*" timestamp="*" classname="Single/TypeParameterizedTestSuite/1" /> <testcase name="HasTypeParamAttribute" type_param="*" status="run" result="c ompleted" time="*" timestamp="*" classname="Single/TypeParameterizedTestSuite/1" />
</testsuite> </testsuite>
</testsuites>""" % { </testsuites>""" % {
'stack': STACK_TRACE_TEMPLATE 'stack': STACK_TRACE_TEMPLATE
} }
EXPECTED_FILTERED_TEST_XML = """<?xml version="1.0" encoding="UTF-8"?> EXPECTED_FILTERED_TEST_XML = """<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="1" failures="0" disabled="0" errors="0" time="*" <testsuites tests="1" failures="0" disabled="0" errors="0" time="*"
timestamp="*" name="AllTests" ad_hoc_property="42"> timestamp="*" name="AllTests" ad_hoc_property="42">
<testsuite name="SuccessfulTest" tests="1" failures="0" disabled="0" <testsuite name="SuccessfulTest" tests="1" failures="0" disabled="0" skipped=" 0"
errors="0" time="*" timestamp="*"> errors="0" time="*" timestamp="*">
<testcase name="Succeeds" status="run" result="completed" time="*" timestamp ="*" classname="SuccessfulTest"/> <testcase name="Succeeds" status="run" result="completed" time="*" timestamp ="*" classname="SuccessfulTest"/>
</testsuite> </testsuite>
</testsuites>""" </testsuites>"""
EXPECTED_SHARDED_TEST_XML = """<?xml version="1.0" encoding="UTF-8"?> EXPECTED_SHARDED_TEST_XML = """<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="3" failures="0" disabled="0" errors="0" time="*" timestamp="* " name="AllTests" ad_hoc_property="42"> <testsuites tests="3" failures="0" disabled="0" errors="0" time="*" timestamp="* " name="AllTests" ad_hoc_property="42">
<testsuite name="SuccessfulTest" tests="1" failures="0" disabled="0" errors="0 " time="*" timestamp="*"> <testsuite name="SuccessfulTest" tests="1" failures="0" disabled="0" skipped=" 0" errors="0" time="*" timestamp="*">
<testcase name="Succeeds" status="run" result="completed" time="*" timestamp ="*" classname="SuccessfulTest"/> <testcase name="Succeeds" status="run" result="completed" time="*" timestamp ="*" classname="SuccessfulTest"/>
</testsuite> </testsuite>
<testsuite name="PropertyRecordingTest" tests="1" failures="0" disabled="0" er <testsuite name="PropertyRecordingTest" tests="1" failures="0" disabled="0" sk
rors="0" time="*" timestamp="*" SetUpTestSuite="yes" TearDownTestSuite="aye"> ipped="0" errors="0" time="*" timestamp="*" SetUpTestSuite="yes" TearDownTestSui
<testcase name="TwoValuesForOneKeyUsesLastValue" status="run" result="comple te="aye">
ted" time="*" timestamp="*" classname="PropertyRecordingTest"> <testcase name="IntValuedProperty" status="run" result="completed" time="*"
timestamp="*" classname="PropertyRecordingTest">
<properties> <properties>
<property name="key_1" value="2"/> <property name="key_int" value="1"/>
</properties> </properties>
</testcase> </testcase>
</testsuite> </testsuite>
<testsuite name="Single/ValueParamTest" tests="1" failures="0" disabled="0" er <testsuite name="Single/ValueParamTest" tests="1" failures="0" disabled="0" sk
rors="0" time="*" timestamp="*"> ipped="0" errors="0" time="*" timestamp="*">
<testcase name="AnotherTestThatHasValueParamAttribute/0" value_param="33" st <testcase name="HasValueParamAttribute/0" value_param="33" status="run" resu
atus="run" result="completed" time="*" timestamp="*" classname="Single/ValuePara lt="completed" time="*" timestamp="*" classname="Single/ValueParamTest" />
mTest" />
</testsuite> </testsuite>
</testsuites>""" </testsuites>"""
EXPECTED_EMPTY_XML = """<?xml version="1.0" encoding="UTF-8"?> EXPECTED_NO_TEST_XML = """<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="0" failures="0" disabled="0" errors="0" time="*" <testsuites tests="0" failures="0" disabled="0" errors="0" time="*"
timestamp="*" name="AllTests"> timestamp="*" name="AllTests">
</testsuites>""" <testsuite name="NonTestSuiteFailure" tests="1" failures="1" disabled="0" skip
ped="0" errors="0" time="*" timestamp="*">
<testcase name="" status="run" result="completed" time="*" timestamp="*" cla
ssname="">
<failure message="gtest_no_test_unittest.cc:*&#x0A;Expected equality of th
ese values:&#x0A; 1&#x0A; 2" type=""><![CDATA[gtest_no_test_unittest.cc:*
Expected equality of these values:
1
2%(stack)s]]></failure>
</testcase>
</testsuite>
</testsuites>""" % {
'stack': STACK_TRACE_TEMPLATE
}
GTEST_PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath(GTEST_PROGRAM_NAME) GTEST_PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath(GTEST_PROGRAM_NAME)
SUPPORTS_TYPED_TESTS = 'TypedTest' in gtest_test_utils.Subprocess( SUPPORTS_TYPED_TESTS = 'TypedTest' in gtest_test_utils.Subprocess(
[GTEST_PROGRAM_PATH, GTEST_LIST_TESTS_FLAG], capture_stderr=False).output [GTEST_PROGRAM_PATH, GTEST_LIST_TESTS_FLAG], capture_stderr=False).output
class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase): class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase):
""" """
Unit test for Google Test's XML output functionality. Unit test for Google Test's XML output functionality.
""" """
skipping to change at line 228 skipping to change at line 254
# This test currently breaks on platforms that do not support typed and # This test currently breaks on platforms that do not support typed and
# type-parameterized tests, so we don't run it under them. # type-parameterized tests, so we don't run it under them.
if SUPPORTS_TYPED_TESTS: if SUPPORTS_TYPED_TESTS:
def testNonEmptyXmlOutput(self): def testNonEmptyXmlOutput(self):
""" """
Runs a test program that generates a non-empty XML output, and Runs a test program that generates a non-empty XML output, and
tests that the XML output is expected. tests that the XML output is expected.
""" """
self._TestXmlOutput(GTEST_PROGRAM_NAME, EXPECTED_NON_EMPTY_XML, 1) self._TestXmlOutput(GTEST_PROGRAM_NAME, EXPECTED_NON_EMPTY_XML, 1)
def testEmptyXmlOutput(self): def testNoTestXmlOutput(self):
"""Verifies XML output for a Google Test binary without actual tests. """Verifies XML output for a Google Test binary without actual tests.
Runs a test program that generates an empty XML output, and Runs a test program that generates an XML output for a binary without tests,
tests that the XML output is expected. and tests that the XML output is expected.
""" """
self._TestXmlOutput('gtest_no_test_unittest', EXPECTED_EMPTY_XML, 0) self._TestXmlOutput('gtest_no_test_unittest', EXPECTED_NO_TEST_XML, 0)
def testTimestampValue(self): def testTimestampValue(self):
"""Checks whether the timestamp attribute in the XML output is valid. """Checks whether the timestamp attribute in the XML output is valid.
Runs a test program that generates an empty XML output, and checks if Runs a test program that generates an empty XML output, and checks if
the timestamp attribute in the testsuites tag is valid. the timestamp attribute in the testsuites tag is valid.
""" """
actual = self._GetXmlOutput('gtest_no_test_unittest', [], {}, 0) actual = self._GetXmlOutput('gtest_no_test_unittest', [], {}, 0)
date_time_str = actual.documentElement.getAttributeNode('timestamp').value date_time_str = actual.documentElement.getAttributeNode('timestamp').value
# datetime.strptime() is only available in Python 2.5+ so we have to # datetime.strptime() is only available in Python 2.5+ so we have to
 End of changes. 24 change blocks. 
38 lines changed or deleted 74 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)