3 new revisions:
Revision: d76324f4c714
Author: Janne Härkönen <[email protected]>
Date: Thu Feb 16 05:17:00 2012
Log: test_htmlutils: remove unnecessary print statement
http://code.google.com/p/robotframework/source/detail?r=d76324f4c714
Revision: e61f8c1938f1
Author: Janne Härkönen <[email protected]>
Date: Thu Feb 16 05:23:27 2012
Log: libdoc: cleanup after usage change
http://code.google.com/p/robotframework/source/detail?r=e61f8c1938f1
Revision: 5b17e9b8965e
Author: Janne Härkönen <[email protected]>
Date: Thu Feb 16 05:23:46 2012
Log: lib2html: fix after API change
http://code.google.com/p/robotframework/source/detail?r=5b17e9b8965e
==============================================================================
Revision: d76324f4c714
Author: Janne Härkönen <[email protected]>
Date: Thu Feb 16 05:17:00 2012
Log: test_htmlutils: remove unnecessary print statement
http://code.google.com/p/robotframework/source/detail?r=d76324f4c714
Modified:
/utest/utils/test_htmlutils.py
=======================================
--- /utest/utils/test_htmlutils.py Thu Feb 16 03:53:08 2012
+++ /utest/utils/test_htmlutils.py Thu Feb 16 05:17:00 2012
@@ -307,7 +307,6 @@
+ '\n\n' \
+ _format_table([['t','4'],['','']]) \
+ '\n\nafter'
- print len(html_format(inp)), len(exp)
assert_equals(html_format(inp), exp)
def test_ragged_table(self):
==============================================================================
Revision: e61f8c1938f1
Author: Janne Härkönen <[email protected]>
Date: Thu Feb 16 05:23:27 2012
Log: libdoc: cleanup after usage change
http://code.google.com/p/robotframework/source/detail?r=e61f8c1938f1
Modified:
/src/robot/libdoc.py
/src/robot/libdocpkg/output.py
/src/robot/libdocpkg/xmlwriter.py
=======================================
--- /src/robot/libdoc.py Thu Feb 16 03:42:26 2012
+++ /src/robot/libdoc.py Thu Feb 16 05:23:27 2012
@@ -14,9 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
-import sys
-import os
USAGE = """robot.libdoc -- Robot Framework library documentation generator
Version: <VERSION>
@@ -68,6 +65,9 @@
http://code.google.com/p/robotframework/wiki/UserGuide
"""
+import sys
+import os
+
if 'robot' not in sys.modules:
import pythonpathsetter # running libdoc.py as script
@@ -81,16 +81,13 @@
Application.__init__(self, USAGE, arg_limits=2, auto_version=False)
def main(self, args, argument=None, name='', version='', format=None):
- lib_or_resource = args[0]
- outfile = args[1]
- libdoc = LibraryDocumentation(lib_or_resource, argument, name,
version)
+ lib_or_res, outfile = args
+ libdoc = LibraryDocumentation(lib_or_res, argument, name, version)
libdoc.save(outfile, self._get_format(format, outfile))
print os.path.abspath(outfile)
def _get_format(self, format, output):
- if format:
- return format
- return os.path.splitext(output)[1][1:]
+ return format if format else os.path.splitext(output)[1][1:]
def libdoc_cli(args):
@@ -99,21 +96,21 @@
:param args: command line arguments as a list of strings.
Example:
- libdoc_cli(['--output', 'doc.html', 'MyLibrary.py'])
+ libdoc_cli(['--name', 'Something', 'MyLibrary.py', 'doc.html'])
"""
LibDoc().execute_cli(args)
-def libdoc(library_or_resource, arguments=None, name='', version='',
- format=None, output=None):
+def libdoc(library_or_resource, output, arguments=None, name='',
version='',
+ format=None):
"""Executes libdoc.
Arguments are same as command line options to libdoc.py.
Example:
- libdoc('MyLibrary.py', arguments=['1st', '2nd'], format='XML')
+ libdoc('MyLibrary.py', 'MyLibrary.html', arguments=['1st', '2nd'])
"""
- LibDoc().execute(library_or_resource, argument=arguments, name=name,
- version=version, format=format, output=output)
+ LibDoc().execute(library_or_resource, output, argument=arguments,
+ name=name, version=version, format=format)
if __name__ == '__main__':
=======================================
--- /src/robot/libdocpkg/output.py Thu Feb 16 03:42:26 2012
+++ /src/robot/libdocpkg/output.py Thu Feb 16 05:23:27 2012
@@ -19,11 +19,11 @@
def __init__(self, output_path, format):
self._output_path = output_path
- self._format = format
+ self._format = format.upper()
self._output_file = None
def __enter__(self):
- if self._format.upper() == 'HTML':
+ if self._format == 'HTML':
self._output_file =
codecs.open(self._output_path, 'w', 'UTF-8')
return self._output_file
return self._output_path
=======================================
--- /src/robot/libdocpkg/xmlwriter.py Tue Feb 14 05:38:50 2012
+++ /src/robot/libdocpkg/xmlwriter.py Thu Feb 16 05:23:27 2012
@@ -28,7 +28,7 @@
self._write_keywords('init', libdoc.inits, writer)
self._write_keywords('kw', libdoc.keywords, writer)
writer.end('keywordspec')
- writer.close(close_output=False)
+ writer.close()
def _write_keywords(self, type, keywords, writer):
for kw in keywords:
==============================================================================
Revision: 5b17e9b8965e
Author: Janne Härkönen <[email protected]>
Date: Thu Feb 16 05:23:46 2012
Log: lib2html: fix after API change
http://code.google.com/p/robotframework/source/detail?r=5b17e9b8965e
Modified:
/doc/libraries/lib2html.py
=======================================
--- /doc/libraries/lib2html.py Mon Feb 13 23:56:08 2012
+++ /doc/libraries/lib2html.py Thu Feb 16 05:23:46 2012
@@ -32,7 +32,7 @@
def create_libdoc(name):
ipath = os.path.join(ROOT,'src','robot','libraries',name+'.py')
opath = os.path.join(ROOT,'doc','libraries',name+'.html')
- libdoc(ipath, output=opath)
+ libdoc(ipath, opath)
if __name__ == '__main__':