2 new revisions:
Revision: 978ed2fdf6ab
Branch: default
Author: Anssi Syrjäsalo
Date: Tue Jun 11 04:28:49 2013
Log: Fixed multiline API attribute docstrings...
http://code.google.com/p/robotframework/source/detail?r=978ed2fdf6ab
Revision: 26e44c7f7630
Branch: default
Author: Anssi Syrjäsalo
Date: Tue Jun 11 04:28:59 2013
Log: Automated merge with https://code.google.com/p/robotframework/
http://code.google.com/p/robotframework/source/detail?r=26e44c7f7630
==============================================================================
Revision: 978ed2fdf6ab
Branch: default
Author: Anssi Syrjäsalo
Date: Tue Jun 11 04:28:49 2013
Log: Fixed multiline API attribute docstrings
Update issue 1468
Multiline attribute docstrings were broken, fixed those.
http://code.google.com/p/robotframework/source/detail?r=978ed2fdf6ab
Modified:
/src/robot/model/keyword.py
/src/robot/model/message.py
/src/robot/model/statistics.py
/src/robot/model/stats.py
/src/robot/model/suitestatistics.py
/src/robot/model/tagstatistics.py
/src/robot/model/testcase.py
/src/robot/model/testsuite.py
/src/robot/model/totalstatistics.py
/src/robot/result/executionerrors.py
/src/robot/result/executionresult.py
/src/robot/result/keyword.py
/src/robot/result/testcase.py
/src/robot/result/testsuite.py
/src/robot/running/model.py
=======================================
--- /src/robot/model/keyword.py Tue Jun 11 02:05:11 2013
+++ /src/robot/model/keyword.py Tue Jun 11 04:28:49 2013
@@ -32,17 +32,25 @@
message_class = Message
def __init__(self, name='', doc='', args=(), type='kw', timeout=None):
- self.parent = None #: :class:`~.testsuite.TestSuite` or
- #: :class:`~.testcase.TestCase` that
contains this keyword.
- self.name = name #: Keyword name.
- self.doc = doc #: Keyword documentation.
- self.args = args #: Keyword arguments, a list of strings.
- self.type = type #: 'SETUP', 'TEARDOWN' or 'KW'.
- self.timeout = timeout #: Keyword timeout.
- self.messages = [] #: Keyword messages, a list of
- #: :class:`~robot.model.message.Messages`
instances.
- self.keywords = [] #: Child keyword results, a list of
- #: :class:`~.Keyword`. instances
+ #: :class:`~.testsuite.TestSuite` or
+ #: :class:`~.testcase.TestCase` that contains this keyword.
+ self.parent = None
+ #: Keyword name.
+ self.name = name
+ #: Keyword documentation.
+ self.doc = doc
+ #: Keyword arguments, a list of strings.
+ self.args = args
+ #: 'SETUP', 'TEARDOWN' or 'KW'.
+ self.type = type
+ #: Keyword timeout.
+ self.timeout = timeout
+ #: Keyword messages, a list of
+ #: :class:`~robot.model.message.Messages` instances.
+ self.messages = []
+ #: Child keyword results, a list of
+ #: :class:`~.Keyword`. instances
+ self.keywords = []
@setter
def keywords(self, keywords):
=======================================
--- /src/robot/model/message.py Tue Jun 11 02:05:11 2013
+++ /src/robot/model/message.py Tue Jun 11 04:28:49 2013
@@ -28,13 +28,17 @@
def __init__(self, message='', level='INFO', html=False,
timestamp=None,
parent=None):
- self.message = message #: The message content as a string.
- self.level = level #: Severity of the message. Either
``TRACE``, ``INFO``,
- #: ``WARN``, ``DEBUG`` or
``FAIL``/``ERROR``.
- self.html = html #: ``True`` if the content is in HTML,
``False`` otherwise.
- self.timestamp = timestamp #: Timestamp in format
``%Y%m%d %H:%M:%S.%f``.
- self.parent = parent #: The object this message was triggered
by.
-
+ #: The message content as a string.
+ self.message = message
+ #: Severity of the message. Either ``TRACE``, ``INFO``,
+ #: ``WARN``, ``DEBUG`` or ``FAIL``/``ERROR``.
+ self.level = level
+ #: ``True`` if the content is in HTML, ``False`` otherwise.
+ self.html = html
+ #: Timestamp in format ``%Y%m%d %H:%M:%S.%f``.
+ self.timestamp = timestamp
+ #: The object this message was triggered by.
+ self.parent = parent
@property
def html_message(self):
"""Returns the message content as HTML.
=======================================
--- /src/robot/model/statistics.py Tue Jun 11 02:05:11 2013
+++ /src/robot/model/statistics.py Tue Jun 11 04:28:49 2013
@@ -33,9 +33,12 @@
tag_stat_exclude,
tag_stat_combine,
tag_doc, tag_stat_link)
suite.visit(StatisticsBuilder(total_builder, suite_builder,
tag_builder))
- self.total = total_builder.stats #: Instance
of :class:`~robot.model.totalstatistics.TotalStatistics`.
- self.suite = suite_builder.stats #: Instance
of :class:`~robot.model.suitestatistics.SuiteStatistics`.
- self.tags = tag_builder.stats #: Instance
of :class:`~robot.model.tagstatistics.TagStatistics`.
+ #: Instance
of :class:`~robot.model.totalstatistics.TotalStatistics`.
+ self.total = total_builder.stats
+ #: Instance
of :class:`~robot.model.suitestatistics.SuiteStatistics`.
+ self.suite = suite_builder.stats
+ #: Instance of :class:`~robot.model.tagstatistics.TagStatistics`.
+ self.tags = tag_builder.stats
def visit(self, visitor):
visitor.visit_statistics(self)
=======================================
--- /src/robot/model/stats.py Tue Jun 11 02:05:11 2013
+++ /src/robot/model/stats.py Tue Jun 11 04:28:49 2013
@@ -22,16 +22,20 @@
"""
def __init__(self, name):
- self.name = name #: Human readable identifier of the object these
statistics
- #: belong to. Either `All Tests` or `Critical
Tests` for
-
#: :class:`~robot.model.totalstatistics.TotalStatistics`,
- #: long name of the suite for
-
#: :class:`~robot.model.suitestatistics.SuiteStatistics`
- #: or name of the tag for
-
#: :class:`~robot.model.tagstatistics.TagStatistics`
- self.passed = 0 #: Number of passed tests.
- self.failed = 0 #: Number of failed tests.
- self.elapsed = 0 #: Number of milliseconds it took to execute.
+ #: Human readable identifier of the object these statistics
+ #: belong to. Either `All Tests` or `Critical Tests` for
+ #: :class:`~robot.model.totalstatistics.TotalStatistics`,
+ #: long name of the suite for
+ #: :class:`~robot.model.suitestatistics.SuiteStatistics`
+ #: or name of the tag for
+ #: :class:`~robot.model.tagstatistics.TagStatistics`
+ self.name = name
+ #: Number of passed tests.
+ self.passed = 0
+ #: Number of failed tests.
+ self.failed = 0
+ #: Number of milliseconds it took to execute.
+ self.elapsed = 0
self._norm_name = normalize(name, ignore='_')
def get_attributes(self, include_label=False, include_elapsed=False,
@@ -88,19 +92,23 @@
class TotalStat(Stat):
"""Stores statistic values for a test run.
"""
- type = 'total' #: Always string `total`
+ #: Always string `total`
+ type = 'total'
class SuiteStat(Stat):
"""Stores statistics values for a single suite.
"""
- type = 'suite' #: Always string `suite`
+ #: Always string `suite`
+ type = 'suite'
def __init__(self, suite):
Stat.__init__(self, suite.longname)
- self.id = suite.id #: Identifier of the suite, e.g.
`s1-s2`.
- self.elapsed = suite.elapsedtime #: Number of milliseconds it
took to execute this suite,
- #: including sub-suites.
+ #: Identifier of the suite, e.g. `s1-s2`.
+ self.id = suite.id
+ #: Number of milliseconds it took to execute this suite,
+ #: including sub-suites.
+ self.elapsed = suite.elapsedtime
self._name = suite.name
def _get_custom_attrs(self):
@@ -117,19 +125,24 @@
class TagStat(Stat):
"""Stores statistic values for a single tag.
"""
- type = 'tag' #: Always string `tag`.
+ #: Always string `tag`.
+ type = 'tag'
def __init__(self, name, doc='', links=None, critical=False,
non_critical=False, combined=''):
Stat.__init__(self, name)
- self.doc = doc #: Documentation of tag as a
string.
- self.links = links or [] #: List of tuples in which the
first value is the link URL and
- #: the second is the link title.
An empty list by default.
- self.critical = critical #: ``True`` if tag is considered
critical, ``False`` otherwise.
- self.non_critical = non_critical #: ``True`` if tag is considered
non-critical,
- #: ``False`` otherwise.
- self.combined = combined #: Pattern as a string if the
tag is combined,
- #: an empty string otherwise.
+ #: Documentation of tag as a string.
+ self.doc = doc
+ #: List of tuples in which the first value is the link URL and
+ #: the second is the link title. An empty list by default.
+ self.links = links or []
+ #: ``True`` if tag is considered critical, ``False`` otherwise.
+ self.critical = critical
+ #: ``True`` if tag is considered non-critical, ``False`` otherwise.
+ self.non_critical = non_critical
+ #: Pattern as a string if the tag is combined,
+ #: an empty string otherwise.
+ self.combined = combined
@property
def info(self):
=======================================
--- /src/robot/model/suitestatistics.py Tue Jun 11 02:05:11 2013
+++ /src/robot/model/suitestatistics.py Tue Jun 11 04:28:49 2013
@@ -20,8 +20,10 @@
"""
def __init__(self, suite):
- self.stat = SuiteStat(suite) #: Instance
of :class:`~robot.model.stats.SuiteStat`.
- self.suites = [] #: List
of :class:`~robot.model.testsuite.TestSuite` objects.
+ #: Instance of :class:`~robot.model.stats.SuiteStat`.
+ self.stat = SuiteStat(suite)
+ #: List of :class:`~robot.model.testsuite.TestSuite` objects.
+ self.suites = []
def visit(self, visitor):
visitor.visit_suite_statistics(self)
=======================================
--- /src/robot/model/tagstatistics.py Tue Jun 11 02:05:11 2013
+++ /src/robot/model/tagstatistics.py Tue Jun 11 04:28:49 2013
@@ -26,12 +26,12 @@
"""
def __init__(self, combined_stats):
- self.tags = NormalizedDict(ignore=['_']) #: Dictionary, where key
is the name of the tag
- #: as a string and value
is an instance of
-
#: :class:`~robot.model.stats.TagStat`.
- self.combined = combined_stats #: Dictionary, where key
is the name
- #: of the created tag as
a string and value is an instance of
-
#: :class:`~robot.model.stats.TagStat`.
+ #: Dictionary, where key is the name of the tag as a string and
value
+ #: is an instance of :class:`~robot.model.stats.TagStat`.
+ self.tags = NormalizedDict(ignore=['_'])
+ #: Dictionary, where key is the name of the created tag as a string
+ # and value is an instance of :class:`~robot.model.stats.TagStat`.
+ self.combined = combined_stats
def visit(self, visitor):
visitor.visit_tag_statistics(self)
=======================================
--- /src/robot/model/testcase.py Tue Jun 11 02:05:11 2013
+++ /src/robot/model/testcase.py Tue Jun 11 04:28:49 2013
@@ -27,13 +27,19 @@
keyword_class = Keyword
def __init__(self, name='', doc='', tags=None, timeout=None):
- self.parent = None #: :class:`~.testsuite.TestSuite` that
contains this test.
- self.name = name #: Test case name.
- self.doc = doc #: Test case documentation.
- self.tags = tags #: Test case tags, a list of strings.
- self.timeout = timeout #: Test case timeout.
- self.keywords = [] #: Keyword results, a list
of :class:`~.keyword.Keyword`.
- #: instances and contains also possible
setup and teardown keywords.
+ #: :class:`~.testsuite.TestSuite` that contains this test.
+ self.parent = None
+ #: Test case name.
+ self.name = name
+ #: Test case documentation.
+ self.doc = doc
+ #: Test case tags, a list of strings.
+ self.tags = tags
+ #: Test case timeout.
+ self.timeout = timeout
+ #: Keyword results, a list of :class:`~.keyword.Keyword`
+ #: instances and contains also possible setup and teardown
keywords.
+ self.keywords = []
@setter
def tags(self, tags):
=======================================
--- /src/robot/model/testsuite.py Tue Jun 11 02:09:40 2013
+++ /src/robot/model/testsuite.py Tue Jun 11 04:28:49 2013
@@ -32,15 +32,23 @@
keyword_class = Keyword
def __init__(self, name='', doc='', metadata=None, source=None):
- self.parent = None #: Parent :class:`TestSuite` or `None`.
- self.name = name #: Test suite name.
- self.doc = doc #: Test suite documentation.
- self.metadata = metadata #: Test suite metadata as a dictionary.
- self.source = source #: Path to the source file or directory.
- self.suites = [] #: A list of
child :class:`~.testsuite.TestSuite` instances.
- self.tests = [] #: A list
of :class:`~.testcase.TestCase` instances.
- self.keywords = [] #: A list containing setup and teardown
as
- #: :class:`~keyword.Keyword` instances.
+ #: Parent :class:`TestSuite` or `None`.
+ self.parent = None
+ #: Test suite name.
+ self.name = name
+ #: Test suite documentation.
+ self.doc = doc
+ #: Test suite metadata as a dictionary.
+ self.metadata = metadata
+ #: Path to the source file or directory.
+ self.source = source
+ #: A list of child :class:`~.testsuite.TestSuite` instances.
+ self.suites = []
+ #: A list of :class:`~.testcase.TestCase` instances.
+ self.tests = []
+ #: A list containing setup and teardown as
+ #: :class:`~keyword.Keyword` instances.
+ self.keywords = []
self._my_visitors = []
@property
=======================================
--- /src/robot/model/totalstatistics.py Tue Jun 11 02:05:11 2013
+++ /src/robot/model/totalstatistics.py Tue Jun 11 04:28:49 2013
@@ -21,10 +21,10 @@
"""
def __init__(self):
- self.critical = TotalStat('Critical Tests') #: Instance
of :class:`~robot.model.stats.TotalStat` for
- #: critical tests.
- self.all = TotalStat('All Tests') #: Instance
of :class:`~robot.model.stats.TotalStat` for
- #: all the tests.
+ #: Instance of :class:`~robot.model.stats.TotalStat` for critical
tests.
+ self.critical = TotalStat('Critical Tests')
+ #: Instance of :class:`~robot.model.stats.TotalStat` for all the
tests.
+ self.all = TotalStat('All Tests')
def visit(self, visitor):
visitor.visit_total_statistics(self)
=======================================
--- /src/robot/result/executionerrors.py Tue Jun 11 02:05:11 2013
+++ /src/robot/result/executionerrors.py Tue Jun 11 04:28:49 2013
@@ -26,8 +26,9 @@
message_class = Message
def __init__(self, messages=None):
- self.messages = messages #: A list-like object
of :class:`~robot.model.message.Message`
- #: instances.
+ #: A :class:`list-like object <robot.model.itemlist.ItemList>` of
+ #: :class:`~robot.model.message.Message` instances.
+ self.messages = messages
@setter
def messages(self, msgs):
=======================================
--- /src/robot/result/executionresult.py Tue Jun 11 02:05:11 2013
+++ /src/robot/result/executionresult.py Tue Jun 11 04:28:49 2013
@@ -29,11 +29,14 @@
"""
def __init__(self, source=None, root_suite=None, errors=None):
- self.source = source #: Path to the XML file
where results are read from.
- self.suite = root_suite or TestSuite() #: Hierarchical
execution results as
- #:
a :class:`~.testsuite.TestSuite` object.
- self.errors = errors or ExecutionErrors() #: Execution errors as
an
-
#: :class:`~.executionerrors.ExecutionErrors` object.
+ #: Path to the XML file where results are read from.
+ self.source = source
+ #: Hierarchical execution results as a
+ #: :class:`~.testsuite.TestSuite` object.
+ self.suite = root_suite or TestSuite()
+ #: Execution errors as a
+ #: :class:`~.executionerrors.ExecutionErrors` object.
+ self.errors = errors or ExecutionErrors()
self.generated_by_robot = True
self._status_rc = True
self._stat_config = {}
=======================================
--- /src/robot/result/keyword.py Tue Jun 11 02:05:11 2013
+++ /src/robot/result/keyword.py Tue Jun 11 04:28:49 2013
@@ -26,20 +26,24 @@
"""Results of a single keyword.
"""
model.Keyword.__init__(self, name, doc, args, type, timeout)
- self.status = status #: String 'PASS' of 'FAIL'.
- self.starttime = starttime #: Keyword execution start time in
format ``%Y%m%d %H:%M:%S.%f``.
- self.endtime = endtime #: Keyword execution end time in
format ``%Y%m%d %H:%M:%S.%f``.
- self.message = '' #: Log messages, a list
of :class:`~.message.Message`
- #: instances. Only used with suite
teardowns.
+ #: String 'PASS' of 'FAIL'.
+ self.status = status
+ #: Keyword execution start time in format ``%Y%m%d %H:%M:%S.%f``.
+ self.starttime = starttime
+ #: Keyword execution end time in format ``%Y%m%d %H:%M:%S.%f``.
+ self.endtime = endtime
+ #: Log messages, a list of :class:`~.message.Message`
+ #: instances. Only used with suite teardowns.
+ self.message = ''
@property
def elapsedtime(self):
- """ Elapsed time in milliseconds.
+ """Elapsed execution time of the keyword in milliseconds.
"""
return utils.get_elapsed_time(self.starttime, self.endtime)
@property
def passed(self):
- """ ``True`` if keyword did pass, ``False``otherwise.
+ """``True`` if the keyword did pass, ``False`` otherwise.
"""
return self.status == 'PASS'
=======================================
--- /src/robot/result/testcase.py Tue Jun 11 02:05:11 2013
+++ /src/robot/result/testcase.py Tue Jun 11 04:28:49 2013
@@ -26,21 +26,31 @@
"""Results of a single test case.
"""
model.TestCase.__init__(self, name, doc, tags, timeout)
- self.status = status #: String 'PASS' of 'FAIL'.
- self.message = message #: Possible failure message.
- self.starttime = starttime #: Test case execution start time in
format ``%Y%m%d %H:%M:%S.%f``.
- self.endtime = endtime #: Test case execution end time in
format ``%Y%m%d %H:%M:%S.%f``.
+ #: String 'PASS' of 'FAIL'.
+ self.status = status
+ #: Possible failure message.
+ self.message = message
+ #: Test case execution start time in format ``%Y%m%d %H:%M:%S.%f``.
+ self.starttime = starttime
+ #: Test case execution end time in format ``%Y%m%d %H:%M:%S.%f``.
+ self.endtime = endtime
@property
def elapsedtime(self):
+ """Elapsed execution time of the test case in milliseconds.
+ """
return utils.get_elapsed_time(self.starttime, self.endtime)
@property
def passed(self):
+ """``True`` if the test case did pass, ``False`` otherwise.
+ """
return self.status == 'PASS'
@property
def critical(self):
+ """``True`` if the test case is marked as critical, ``False``
otherwise.
+ """
if not self.parent:
return True
return self.parent.criticality.test_is_critical(self)
=======================================
--- /src/robot/result/testsuite.py Tue Jun 11 02:05:11 2013
+++ /src/robot/result/testsuite.py Tue Jun 11 04:28:49 2013
@@ -36,9 +36,12 @@
"""Result of a single test suite.
"""
model.TestSuite.__init__(self, name, doc, metadata, source)
- self.message = message #: Suite setup/teardown error message.
- self.starttime = starttime #: Suite execution start time in
format ``%Y%m%d %H:%M:%S.%f``.
- self.endtime = endtime #: Suite execution end time in format
``%Y%m%d %H:%M:%S.%f``.
+ #: Suite setup/teardown error message.
+ self.message = message
+ #: Suite execution start time in format ``%Y%m%d %H:%M:%S.%f``.
+ self.starttime = starttime
+ #: Suite execution end time in format ``%Y%m%d %H:%M:%S.%f``.
+ self.endtime = endtime
self._criticality = None
@property
@@ -74,7 +77,7 @@
@property
def stat_message(self):
- """String representation of suite's :attr:`statistics`."""
+ """String representation of the suite's :attr:`statistics`."""
return self.statistics.message
@property
=======================================
--- /src/robot/running/model.py Tue Jun 11 02:05:11 2013
+++ /src/robot/running/model.py Tue Jun 11 04:28:49 2013
@@ -37,7 +37,8 @@
"""Running model for single keyword.
"""
model.Keyword.__init__(self, name=name, args=args, type=type)
- self.assign = assign #: Variables to be assigned.
+ #: Variables to be assigned.
+ self.assign = assign
def is_for_loop(self):
return False
@@ -47,6 +48,8 @@
@property
def keyword(self):
+ """ Name of the keyword.
+ """
return self.name
@@ -82,12 +85,13 @@
"""Running model for single test case.
"""
model.TestCase.__init__(self, name, doc, tags, timeout)
- self.template = template #: Name of the keyword that has been
used as template
- #: when building the test. `None` if no
template used.
+ #: Name of the keyword that has been used as template
+ #: when building the test. `None` if no is template used.
+ self.template = template
@setter
def timeout(self, timeout):
- """Timeout limit of the test case
+ """Timeout limit of the test case as an instance
of :class:`~.Timeout`
"""
return Timeout(*timeout) if timeout else None
@@ -101,11 +105,14 @@
"""Running model for single test suite.
"""
model.TestSuite.__init__(self, name, doc, metadata, source)
- self.imports = [] #: Imports the suite contains.
- self.user_keywords = [] #: User keywords defined in the same file
as the
- #: suite. **Likely to change or to be
removed.**
- self.variables = [] #: Variables defined in the same file as
the suite.
- #: **Likely to change or to be removed.**
+ #: Imports the suite contains.
+ self.imports = []
+ #: User keywords defined in the same file as the suite.
+ #: **Likely to change or to be removed.**
+ self.user_keywords = []
+ #: Variables defined in the same file as the suite.
+ #: **Likely to change or to be removed.**
+ self.variables = []
@setter
def imports(self, imports):
==============================================================================
Revision: 26e44c7f7630
Branch: default
Author: Anssi Syrjäsalo
Date: Tue Jun 11 04:28:59 2013
Log: Automated merge with https://code.google.com/p/robotframework/
http://code.google.com/p/robotframework/source/detail?r=26e44c7f7630
--
---
You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to robotframework-commit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.