2 new revisions:

Revision: e33169cefb6c
Author:   Pekka Klärck
Date:     Sun Jan 29 04:17:35 2012
Log:      ooops, didn't apparently run tests before commit....
http://code.google.com/p/robotframework/source/detail?r=e33169cefb6c

Revision: 10721781f2e7
Author:   Pekka Klärck
Date:     Sun Jan 29 04:20:55 2012
Log:      robot.run_rebot -> robot.rebot...
http://code.google.com/p/robotframework/source/detail?r=10721781f2e7

==============================================================================
Revision: e33169cefb6c
Author:   Pekka Klärck
Date:     Sun Jan 29 04:17:35 2012
Log:      ooops, didn't apparently run tests before commit....
http://code.google.com/p/robotframework/source/detail?r=e33169cefb6c

Modified:
 /utest/api/test_run_and_rebot.py

=======================================
--- /utest/api/test_run_and_rebot.py    Sun Jan 29 04:08:47 2012
+++ /utest/api/test_run_and_rebot.py    Sun Jan 29 04:17:35 2012
@@ -10,7 +10,8 @@

 ROOT = dirname(dirname(dirname(abspath(__file__))))
 TEMP = tempfile.gettempdir()
-LOG = 'Log:     %s' % join(TEMP, 'log.html')
+LOG_PATH = join(TEMP, 'log.html')
+LOG = 'Log:     %s' % LOG_PATH


 class Base(unittest.TestCase):
@@ -24,8 +25,8 @@
         sys.__stderr__ = StringIO()
         sys.stdout = StringIO()
         sys.stderr = StringIO()
-        if exists(LOG):
-            remove(LOG)
+        if exists(LOG_PATH):
+            remove(LOG_PATH)

     def tearDown(self):
         sys.__stdout__ = self.orig__stdout__
@@ -65,7 +66,7 @@
     def test_run_once(self):
         assert_equals(run(self.data, outputdir=TEMP, report='none'), 1)
self._assert_outputs([('Pass And Fail', 2), (LOG, 1), ('Report:', 0)])
-        assert exists(LOG)
+        assert exists(LOG_PATH)

     def test_run_multiple_times(self):
         assert_equals(run(self.data, output='NONE', critical='nomatch'), 0)
@@ -85,8 +86,8 @@

     def test_run_once(self):
assert_equals(run_rebot(self.data, outputdir=TEMP, report='NONE'), 1)
-        self._assert_outputs([(LOG, 1, ('Report:', 0))])
-        assert exists(LOG)
+        self._assert_outputs([(LOG, 1), ('Report:', 0)])
+        assert exists(LOG_PATH)

     def test_run_multiple_times(self):
assert_equals(run_rebot(self.data, outputdir=TEMP, critical='nomatch'), 0)

==============================================================================
Revision: 10721781f2e7
Author:   Pekka Klärck
Date:     Sun Jan 29 04:20:55 2012
Log:      robot.run_rebot -> robot.rebot

Update issue 1044
Status: Started
Owner: pekka.klarck
Renamed robot.run_rebot method to robot.rebot.
http://code.google.com/p/robotframework/source/detail?r=10721781f2e7

Modified:
 /src/robot/__init__.py
 /utest/api/test_run_and_rebot.py

=======================================
--- /src/robot/__init__.py      Sun Jan 29 04:08:47 2012
+++ /src/robot/__init__.py      Sun Jan 29 04:20:55 2012
@@ -42,7 +42,7 @@

 def rebot_from_cli(args, usage):
     LOGGER.info(get_full_version('Rebot'))
-    return _run_or_rebot_from_cli(run_rebot, args, usage)
+    return _run_or_rebot_from_cli(rebot, args, usage)

 def _run_or_rebot_from_cli(method, cliargs, usage, **argparser_config):
     LOGGER.register_file_logger()
@@ -121,7 +121,7 @@
     return suite.return_code


-def run_rebot(*datasources, **options):
+def rebot(*datasources, **options):
"""Creates reports/logs from given Robot output files with given options.

Given input files are paths to Robot output files similarly as when running
@@ -131,8 +131,8 @@
     Returns a return code similarly as when running on the command line.

     Examples:
-    run_rebot('/path/to/output.xml')
- run_rebot('/path/out1.xml', '/path/out2.xml', report='myrep.html', log='NONE')
+    rebot('/path/to/output.xml')
+ rebot('/path/out1.xml', '/path/out2.xml', report='myrep.html', log='NONE')

     Equivalent command line usage:
     rebot /path/to/output.xml
=======================================
--- /utest/api/test_run_and_rebot.py    Sun Jan 29 04:17:35 2012
+++ /utest/api/test_run_and_rebot.py    Sun Jan 29 04:20:55 2012
@@ -6,7 +6,7 @@
 from StringIO import StringIO

 from robot.utils.asserts import assert_equals
-from robot import run, run_rebot
+from robot import run, rebot

 ROOT = dirname(dirname(dirname(abspath(__file__))))
 TEMP = tempfile.gettempdir()
@@ -85,18 +85,18 @@
     nonex = join(TEMP, 'non-existing-file-this-is.xml')

     def test_run_once(self):
- assert_equals(run_rebot(self.data, outputdir=TEMP, report='NONE'), 1)
+        assert_equals(rebot(self.data, outputdir=TEMP, report='NONE'), 1)
         self._assert_outputs([(LOG, 1), ('Report:', 0)])
         assert exists(LOG_PATH)

     def test_run_multiple_times(self):
- assert_equals(run_rebot(self.data, outputdir=TEMP, critical='nomatch'), 0) - assert_equals(run_rebot(self.data, outputdir=TEMP, name='New Name'), 1) + assert_equals(rebot(self.data, outputdir=TEMP, critical='nomatch'), 0)
+        assert_equals(rebot(self.data, outputdir=TEMP, name='New Name'), 1)
         self._assert_outputs([(LOG, 2)])

     def test_run_fails(self):
-        assert_equals(run_rebot(self.nonex), 252)
-        assert_equals(run_rebot(self.data, outputdir=TEMP), 1)
+        assert_equals(rebot(self.nonex), 252)
+        assert_equals(rebot(self.data, outputdir=TEMP), 1)
         self._assert_outputs(stdout=[(LOG, 1)],
stderr=[('[ ERROR ]', 1), (self.nonex, 2), ('--help', 1)])

Reply via email to