Revision: 0a744ae2f4e0
Author:   Pekka Klärck
Date:     Fri Sep 16 07:30:45 2011
Log:      some more test data enhancements
http://code.google.com/p/robotframework/source/detail?r=0a744ae2f4e0

Modified:
 /tools/libdoc/test/dynamic.py
 /tools/remoteserver/example/examplelibrary.py

=======================================
--- /tools/libdoc/test/dynamic.py       Fri Sep 16 07:18:23 2011
+++ /tools/libdoc/test/dynamic.py       Fri Sep 16 07:30:45 2011
@@ -1,7 +1,7 @@
 class dynamic:

-    def __init__(self, a=1, b=2):
-        """This doc nor args should not be used."""
+    def __init__(self, arg="This arg should not be used"):
+        """This doc should not be used."""

     def get_keyword_names(self):
         return ['Keyword 1', 'KW 2']
@@ -11,21 +11,25 @@

     def get_keyword_arguments(self, name):
         if name == '__init__':
-            return ['x=1, y=2']
+            return ['dyn_arg=This arg returned dynamically']
         return ['arg%d' % (i+1) for i in range(int(name[-1]))]

     def get_keyword_documentation(self, name):
-        return '''Dummy documentation for `%s`.
+        short = 'Dummy documentation for `%s`.' % name
+        if name.startswith('__'):
+            return short
+        return short + '''

 Neither `Keyword 1` or `KW 2` do anything really interesting.
 They do, however, accept some `arguments`.
+Neither `introduction` nor `importing` contain any more information.

 Examples:
 | Keyword 1 | arg |
-| KW 1 | arg | arg 2 |
 | KW 2 | arg | arg 2 |
+| KW 2 | arg | arg 3 |

 -------

 http://robotframework.org
-''' % name
+'''
=======================================
--- /tools/remoteserver/example/examplelibrary.py       Fri Sep 16 07:18:23 2011
+++ /tools/remoteserver/example/examplelibrary.py       Fri Sep 16 07:30:45 2011
@@ -11,8 +11,8 @@
     starting from Robot Framework 2.6.2.
     """

-    def __init__(self, a=1):
-        """This library takes no arguments."""
+    def __init__(self, arg="Also args should be shown in docs now"):
+        """Also this doc should be in shown in library doc."""

     def count_items_in_directory(self, path):
"""Returns the number of items in the directory specified by `path`."""

Reply via email to