3 new revisions:
Revision: 24802259bcc7
Author: Pekka Klärck
Date: Wed Jul 13 05:59:57 2011
Log: style
http://code.google.com/p/robotframework/source/detail?r=24802259bcc7
Revision: 235b34df068f
Author: Pekka Klärck
Date: Wed Jul 13 06:00:28 2011
Log: split tests/keywords only when there is data to split
http://code.google.com/p/robotframework/source/detail?r=235b34df068f
Revision: 8f9ee4a45427
Author: Pekka Klärck
Date: Wed Jul 13 06:00:33 2011
Log: Automated merge with https://robotframework.googlecode.com/hg/
http://code.google.com/p/robotframework/source/detail?r=8f9ee4a45427
==============================================================================
Revision: 24802259bcc7
Author: Pekka Klärck
Date: Wed Jul 13 05:59:57 2011
Log: style
http://code.google.com/p/robotframework/source/detail?r=24802259bcc7
Modified:
/utest/result/test_parsingcontext.py
=======================================
--- /utest/result/test_parsingcontext.py Wed Jul 13 04:23:55 2011
+++ /utest/result/test_parsingcontext.py Wed Jul 13 05:59:57 2011
@@ -199,6 +199,7 @@
self._test(self.s12, 3, 1, 2, 1)
self._test(self.s1, 4, 2, 3, 2)
+
class TestLocation(unittest.TestCase):
def setUp(self):
==============================================================================
Revision: 235b34df068f
Author: Pekka Klärck
Date: Wed Jul 13 06:00:28 2011
Log: split tests/keywords only when there is data to split
http://code.google.com/p/robotframework/source/detail?r=235b34df068f
Modified:
/src/robot/result/parsingcontext.py
/utest/result/test_js_serializer.py
/utest/result/test_reporting.py
=======================================
--- /src/robot/result/parsingcontext.py Wed Jul 13 04:23:55 2011
+++ /src/robot/result/parsingcontext.py Wed Jul 13 06:00:28 2011
@@ -84,7 +84,7 @@
def end_test(self, kw_data=None):
self._location.end_test()
- if self._split_log:
+ if self._split_log and kw_data:
self.split_results.append((kw_data,
self._split_text_caches[-1].dump()))
return len(self.split_results)
return kw_data
@@ -106,7 +106,7 @@
def end_suite_setup_or_teardown(self, kw_data=None):
self._location.end_keyword()
- if self._split_log:
+ if self._split_log and kw_data:
self.split_results.append((kw_data,
self._split_text_caches[-1].dump()))
return len(self.split_results)
return kw_data
=======================================
--- /utest/result/test_js_serializer.py Wed Jul 13 04:23:55 2011
+++ /utest/result/test_js_serializer.py Wed Jul 13 06:00:28 2011
@@ -475,6 +475,10 @@
<kw type="teardown" name="Suite Teardown" timeout="">
<doc>td doc</doc>
<msg timestamp="20110601 12:01:51.354" level="WARN">td msg</msg>
+ <kw type="kw" name="Td Sub keyword" timeout="">
+ <doc>td sub doc</doc>
+ <status status="PASS" endtime="20110601 12:01:51.354"
starttime="20110601 12:01:51.354"></status>
+ </kw>
<status status="FAIL" endtime="20110601 12:01:51.354"
starttime="20110601 12:01:51.354"></status>
</kw>
<status status="FAIL" endtime="20110601 12:01:51.354"
starttime="20110601 12:01:51.353"></status>
@@ -501,11 +505,52 @@
],
['*kw', '*Second keyword', '*', '*2nd doc', ['*P',
0, 0], [], []]]
_assert_plain_suite_item(split_setup,
*self._context.split_results[0])
- split_teardown = []
+ split_teardown = [['*kw', '*Td Sub keyword', '*', '*td sub doc',
['*P', 1, 0], [], []]]
_assert_plain_suite_item(split_teardown,
*self._context.split_results[2])
assert_equals(self._context.link_to([0, 'W', 'setup
msg']), "s1-k1-k1")
assert_equals(self._context.link_to([1, 'W', 'td msg']), "s1-k2")
+ def test_tests_and_suite_keywords_without_keywords_are_not_split(self):
+ data_model = self._get_data_model("""
+<suite source="/tmp/supersimple.txt" name="Supersimple">
+ <doc>sdoc</doc>
+ <kw type="setup" name="SSetup" timeout="">
+ <doc>setup</doc>
+ <status status="PASS" endtime="20110601 12:01:51.353"
starttime="20110601 12:01:51.353"></status>
+ </kw>
+ <test name="Test" timeout="1s">
+ <doc>doc</doc>
+ <kw type="kw" name="Keyword" timeout="">
+ <doc>kd</doc>
+ <status status="PASS" endtime="20110601 12:01:51.354"
starttime="20110601 12:01:51.353"></status>
+ </kw>
+ <status status="PASS" endtime="20110601 12:01:51.354" critical="yes"
starttime="20110601 12:01:51.353"></status>
+ </test>
+ <test name="Empty" timeout="">
+ <doc>empty</doc>
+ <status status="FAIL" endtime="20110601 12:01:51.354" critical="no"
starttime="20110601 12:01:51.354">Err</status>
+ </test>
+ <kw type="teardown" name="STeardown" timeout="">
+ <doc>td</doc>
+ <msg timestamp="20110601 12:01:51.354" level="WARN">msg</msg>
+ <status status="PASS" endtime="20110601 12:01:51.354"
starttime="20110601 12:01:51.354"></status>
+ </kw>
+ <status status="PASS" endtime="20110601 12:01:51.354"
starttime="20110601 12:01:51.353"></status>
+</suite>""")
+ assert_model(data_model,
+ plain_suite=
+
['*Supersimple', '*/tmp/supersimple.txt', '*', '*sdoc',
+ ['*P', 0, 1], [],
+ [['*Test', '*1s', '*Y', '*doc', ['*P', 0, 1], 1],
+ ['*Empty', '*', '*N', '*empty', ['*F', 1,
0, '*Err'], []]],
+ [['*setup', '*SSetup', '*', '*setup',
+ ['*P', 0, 0], [], []],
+ ['*teardown', '*STeardown', '*', '*td',
+ ['*P', 1, 0], [], [[1, '*W', '*msg']]]],
+ [2, 1, 1, 1]])
+ split_test = [['*kw', '*Keyword', '*', '*kd', ['*P', 0, 1], [],
[]]]
+ _assert_plain_suite_item(split_test,
*self._context.split_results[0])
+
class TestRelativeSuiteSource(_JsSerializerTestBase):
SUITE_XML = """
=======================================
--- /utest/result/test_reporting.py Wed Jul 13 04:23:55 2011
+++ /utest/result/test_reporting.py Wed Jul 13 06:00:28 2011
@@ -134,7 +134,7 @@
self._settings['SplitLog'] = True
self._settings['Log'] = '/tmp/foo/log.bar.html'
self._reporter.write_robot_results(resources.GOLDEN_OUTPUT)
- expected = ('/tmp/foo/log.bar-%d.js' % i for i in range(1, 9))
+ expected = ('/tmp/foo/log.bar-%d.js' % i for i in range(1, 5))
self._assert_expected_split_tests(*expected)
def _assert_expected_log(self, expected_file_name):
==============================================================================
Revision: 8f9ee4a45427
Author: Pekka Klärck
Date: Wed Jul 13 06:00:33 2011
Log: Automated merge with https://robotframework.googlecode.com/hg/
http://code.google.com/p/robotframework/source/detail?r=8f9ee4a45427