3 new revisions:
Revision: fda175b847f2
Branch: default
Author: Robot Framework Developers (robotframew...@gmail.com)
Date: Tue Jun 11 02:08:56 2013
Log: setter: copy doc of the setter method
http://code.google.com/p/robotframework/source/detail?r=fda175b847f2
Revision: c2956fbfe13f
Branch: default
Author: Robot Framework Developers (robotframew...@gmail.com)
Date: Tue Jun 11 02:09:30 2013
Log: apidoc to TestSuite.suites
http://code.google.com/p/robotframework/source/detail?r=c2956fbfe13f
Revision: 918eee2cdca7
Branch: default
Author: Robot Framework Developers (robotframew...@gmail.com)
Date: Tue Jun 11 02:09:40 2013
Log: Automated merge with https://robotframework.googlecode.com/hg/
http://code.google.com/p/robotframework/source/detail?r=918eee2cdca7
==============================================================================
Revision: fda175b847f2
Branch: default
Author: Robot Framework Developers (robotframew...@gmail.com)
Date: Tue Jun 11 02:08:56 2013
Log: setter: copy doc of the setter method
http://code.google.com/p/robotframework/source/detail?r=fda175b847f2
Modified:
/src/robot/utils/setter.py
/utest/utils/test_setter.py
=======================================
--- /src/robot/utils/setter.py Thu Jun 6 07:00:44 2013
+++ /src/robot/utils/setter.py Tue Jun 11 02:08:56 2013
@@ -18,6 +18,7 @@
def __init__(self, method):
self.method = method
self.attr_name = '_setter__' + method.__name__
+ self.__doc__ = method.__doc__
def __get__(self, instance, owner):
if instance is None:
=======================================
--- /utest/utils/test_setter.py Wed Feb 29 01:30:03 2012
+++ /utest/utils/test_setter.py Tue Jun 11 02:08:56 2013
@@ -4,18 +4,23 @@
from robot.utils.setter import setter, SetterAwareType
-class Example(object):
- @setter
- def attr(self, value):
- return value * 2
-
class ExampleWithSlots(object):
__slots__ = []
__metaclass__ = SetterAwareType
+
@setter
def attr(self, value):
return value * 2
+ @setter
+ def with_doc(self, value):
+ """The doc string."""
+ return value
+
+
+class Example(ExampleWithSlots):
+ __metaclass__ = type
+
class TestSetter(unittest.TestCase):
@@ -33,6 +38,10 @@
self.item.other_attr = 1
assert_equal(self.item.other_attr, 1)
+ def test_copy_doc(self):
+ assert_equal(type(self.item).attr.__doc__, None)
+ assert_equal(type(self.item).with_doc.__doc__, "The doc string.")
+
class TestSetterWithSlotsAndSetterAwareType(TestSetter):
==============================================================================
Revision: c2956fbfe13f
Branch: default
Author: Robot Framework Developers (robotframew...@gmail.com)
Date: Tue Jun 11 02:09:30 2013
Log: apidoc to TestSuite.suites
http://code.google.com/p/robotframework/source/detail?r=c2956fbfe13f
Modified:
/src/robot/model/testsuite.py
=======================================
--- /src/robot/model/testsuite.py Mon Jun 10 10:22:16 2013
+++ /src/robot/model/testsuite.py Tue Jun 11 02:09:30 2013
@@ -61,6 +61,7 @@
@setter
def suites(self, suites):
+ """A list-like :class:`~.TestSuites` object containing child
suites."""
return TestSuites(self.__class__, self, suites)
@setter
==============================================================================
Revision: 918eee2cdca7
Branch: default
Author: Robot Framework Developers (robotframew...@gmail.com)
Date: Tue Jun 11 02:09:40 2013
Log: Automated merge with https://robotframework.googlecode.com/hg/
http://code.google.com/p/robotframework/source/detail?r=918eee2cdca7
Modified:
/src/robot/model/testsuite.py
=======================================
--- /src/robot/model/testsuite.py Tue Jun 11 02:05:11 2013
+++ /src/robot/model/testsuite.py Tue Jun 11 02:09:40 2013
@@ -63,6 +63,7 @@
@setter
def suites(self, suites):
+ """A list-like :class:`~.TestSuites` object containing child
suites."""
return TestSuites(self.__class__, self, suites)
@setter
--
---
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.