2 new revisions:

Revision: d6b8767625af
Author:   Robot Framework Developers ([email protected])
Date:     Wed Nov 30 05:25:33 2011
Log:      removed crufty public API tests
http://code.google.com/p/robotframework/source/detail?r=d6b8767625af

Revision: 95ec5999e3b3
Author:   Robot Framework Developers ([email protected])
Date:     Wed Nov 30 05:26:02 2011
Log:      simplify returning rc
http://code.google.com/p/robotframework/source/detail?r=95ec5999e3b3

==============================================================================
Revision: d6b8767625af
Author:   Robot Framework Developers ([email protected])
Date:     Wed Nov 30 05:25:33 2011
Log:      removed crufty public API tests
http://code.google.com/p/robotframework/source/detail?r=d6b8767625af

Deleted:
 /atest/robot/public_api/public_api.txt
 /atest/testdata/public_api/apihelper.py
 /atest/testdata/public_api/output.py
 /atest/testdata/public_api/run.py
 /atest/testdata/public_api/testdata/empty_settings.html
 /atest/testdata/public_api/testdata/everything.html
 /atest/testdata/public_api/testdata/minimum.html
 /atest/testdata/public_api/testdata/output_modified_suite_data.txt
 /atest/testdata/public_api/testdata/output_modified_test_data.txt
 /atest/testdata/public_api/testdata/output_suite_data.txt
 /atest/testdata/public_api/testdata/output_test_data.txt
 /atest/testdata/public_api/testdata/resource.html
 /atest/testdata/public_api/testdata/run_suite_data.txt
 /atest/testdata/public_api/testdata/run_test_data.txt
 /atest/testdata/public_api/testdata/vars.py

=======================================
--- /atest/robot/public_api/public_api.txt      Mon Sep 20 08:21:24 2010
+++ /dev/null
@@ -1,21 +0,0 @@
-*** Settings ***
-Force Tags      jybot  pybot
-Default Tags    regression
-Library         OperatingSystem
-
-*** Variables ***
-${SCRIPT_DIR}  ${CURDIR}${/}..${/}..${/}testdata${/}public_api
-
-*** Test Cases ***
-Running
-    Test public API  run
-
-Output
-    Test public API  output
-
-*** Keywords ***
-Test Public API
-    [Arguments]  ${name}
- ${rc} ${output} = Run And Return Rc And Output python ${SCRIPT_DIR}${/}${name}.py - Equals ${rc} ${0} ${rc} test(s) for API '${name}' failed. Output:\n\n${output} No Values
-
=======================================
--- /atest/testdata/public_api/apihelper.py     Thu Apr  2 00:58:28 2009
+++ /dev/null
@@ -1,76 +0,0 @@
-import os
-
-OUTPATH = os.path.join(os.path.dirname(__file__), 'output')
-
-
-def verify_suites(suite, path_to_data):
-    suites = [ suite ] + suite.suites
-    return verify_attributes(suites, parse_data(path_to_data))
-
-def verify_tests(suite, path_to_data):
-    tests = _get_tests(suite)
-    return verify_attributes(tests, parse_data(path_to_data))
-
-def _get_tests(suite):
-    tests = []
-    for suite in suite.suites:
-        tests.extend(suite.tests)
-    return tests
-
-
-def verify_attributes(items, data):
-    fails = 0
-    for i in range(len(data[0])-2):
-        suite = test = items[i]
-        for attr in data:
-            expected =  attr['EXP%d' % (i+1)]
-            if expected == 'N/A':
-                continue
-            actual = eval(attr['ACTUAL'])
-
-            try:
-                expected = eval(expected)
-            except:
-                pass
-            fails += verify_attribute(attr['TITLE'], actual, expected )
-    return fails
-
-
-def verify_attribute(name, actual, expected):
-    title = '%s: %s' % (name, actual)
-    if actual == expected:
-        print '%s | PASS |' % title.ljust(70)
-        return 0
-    else:
-        print '%s | FAIL |' % title.ljust(70)
- print ' Expected: %s' % expected, "(types: %s, %s)" % (type(actual), type(expected))
-        return 1
-
-def parse_data(path):
-    content = open(path).read().splitlines()
-    data = []
-    for row in content:
-        if row.strip() == '' or row.startswith('#'):
-            continue
-        cells = [ cell.strip() for cell in row.split('|') ]
- titles = [ 'TITLE', 'ACTUAL' ] + [ 'EXP%d' % (i+1) for i in range(len(cells[2:]))]
-        if cells[0] == '...':
-            for title, cell in zip(titles[2:], cells[2:]):
-                if cell != '':
-                    data[-1][title] += '\n' + cell
-            continue
-        data.append(dict(zip(titles, cells)))
-    return data
-
-
-def remove_outputdir():
-    for file in os.listdir(OUTPATH):
-        os.remove(os.path.join(OUTPATH, file))
-    os.rmdir(OUTPATH)
-
-
-if __name__ == '__main__':
-#    _verify_attribute('title', 'foo', 'foo')
-#    _verify_attribute('false_title', 'bar', 'foo')
-# _verify_attribute('name', 'value in \nmutltiple lines','value in \nmutltiple lines')
-    parse_data('data.txt')
=======================================
--- /atest/testdata/public_api/output.py        Mon Mar  8 05:03:09 2010
+++ /dev/null
@@ -1,48 +0,0 @@
-import sys
-import os
-
-sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..', 'src'))
-from robot.output import TestSuite
-
-from apihelper import verify_suites, verify_tests, remove_outputdir
-
-
-BASE = os.path.dirname(os.path.abspath(sys.argv[0]))
-DATA = os.path.join(BASE, 'testdata')
-
-def read_and_modify_suite(path):
-    suite = TestSuite(path)
- fails = verify_suites(suite, os.path.join(DATA, 'output_suite_data.txt')) - fails += verify_tests(suite, os.path.join(DATA, 'output_test_data.txt'))
-
-    _process_suite(suite)
-    suite.set_status()
- fails = verify_suites(suite, os.path.join(DATA, 'output_modified_suite_data.txt')) - fails += verify_tests(suite, os.path.join(DATA, 'output_modified_test_data.txt'))
-
-    print 'Total failures: %d' % fails
-    remove_outputdir()
-    return fails
-
-def _process_suite(suite):
-    if suite.suites:
-        for sub in suite.suites:
-            if sub.status == 'FAIL':
-                sub.status = 'PASS'
-            _process_suite(sub)
-    if not suite.tests:
-        return
-    for test in suite.tests:
-        if test.status == 'FAIL':
-            test.status = 'PASS'
-        if not test.keywords:
-            return
-        for kw in test.keywords:
-            if kw.status == 'FAIL':
-                kw.status = 'PASS'
-
-
-if __name__ == '__main__':
-    import robot
-    robot.run(DATA, outputdir=os.path.join(BASE,'output'))
- sys.exit(read_and_modify_suite(os.path.join(BASE,'output','output.xml')))
=======================================
--- /atest/testdata/public_api/run.py   Thu Nov  3 06:56:13 2011
+++ /dev/null
@@ -1,25 +0,0 @@
-import os
-import sys
-
-sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..', 'src'))
-from robot import run
-
-from apihelper import verify_suites, verify_tests, remove_outputdir
-
-BASE = os.path.dirname(os.path.abspath(sys.argv[0]))
-DATA = os.path.join(BASE, 'testdata')
-OUTPUT = os.path.join(BASE, 'output')
-
-
-def run_suite():
-    suite, _ = run(DATA, outputdir=OUTPUT, monitorcolors='off')
-    fails = verify_suites(suite, os.path.join(DATA, 'run_suite_data.txt'))
-    fails += verify_tests(suite, os.path.join(DATA,'run_test_data.txt'))
-
-    print 'Total failures: %d' % fails
-    remove_outputdir()
-    return fails
-
-
-if __name__ == '__main__':
-    sys.exit(run_suite())
=======================================
--- /atest/testdata/public_api/testdata/empty_settings.html Sat May 31 09:57:24 2008
+++ /dev/null
@@ -1,381 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-
-
-
-  <style type="text/css">
-html {
-  font-family: Arial,Helvetica,sans-serif;
-  background-color: white;
-  color: black;
-}
-p {
-  max-width: 60em;
-}
-table {
-  border-collapse: collapse;
-  empty-cells: show;
-  margin: 1em 0em;
-  border: 0.1em solid black;
-}
-th, td {
-  border-style: solid;
-  border-width: 0.05em 0.1em;
-  border-color: black;
-  padding: 0.1em 0.2em;
-  height: 1.5em;
-}
-th {
-  background-color: rgb(192, 192, 192);
-  color: black;
-  border-width: 0.1em;
-  font-weight: bold;
-  text-align: center;
-  text-transform: capitalize;
-  letter-spacing: 0.1em;
-}
-/* Widths of named columns */
-col.name {
-  width: 10em;
-}
-.action, .value, .arg {
-  width: 15em;
-}
-/* Properties for the name column
-- td:first-child should work in CSS 2.1 avare browsers (tested in Firefox)
-- col.name is against specs but works in IE
-*/
-td:first-child, col.name {
-  background-color: rgb(240, 240, 240);
-  text-transform: capitalize;
-  letter-spacing: 0.1em;
-}
-/* required for IE */
-th {
-  font-style: normal;
-}
-  </style>
-
-  <title>Robot Test Cases</title></head>
-<body>
-
-
-<h1>Robot Test Cases</h1>
-
-
-
-<table border="1">
-
-
- <colgroup span="99"><col class="name"><col class="value" span="4"></colgroup>
-  <thead>
-  <tr>
-
-
-    <th>Setting</th>
-
-
-    <th>Value</th>
-
-
-    <th>Value</th>
-
-
-    <th>value</th>
-
-
-    <th>Value</th>
-
-
-  </tr>
-
-
-  </thead>
-  <tbody>
-
-
-
-
-
- <tr><td>Documentation</td><td></td><td></td><td></td><td></td></tr><tr><td>Suite Setup</td><td></td><td></td><td></td><td></td></tr><tr><td>Suite Teardown</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Default Tags</td><td></td><td></td><td></td><td></td></tr><tr><td>Force Tags</td><td></td><td></td><td></td><td></td></tr><tr>
-
-
-      <td>Test Setup</td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
- </tr><tr><td>Test Teardown</td><td></td><td></td><td></td><td></td></tr>
-
-
-
-  </tbody>
-</table>
-
-
-
-<table border="1">
-
-
- <colgroup span="99"><col class="name"><col class="value" span="4"></colgroup>
-  <thead>
-  <tr>
-
-
-    <th>Variable</th>
-
-
-    <th>Value</th>
-
-
-    <th>Value</th>
-
-
-    <th>Value</th>
-
-
-    <th>Value</th>
-
-
-  </tr>
-
-
-  </thead>
-  <tbody>
-
-
-    <tr>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
-    <tr>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
-
-  </tbody>
-</table>
-
-
-
-<table border="1">
-
-
- <colgroup span="99"><col class="name"><col class="action"><col class="arg" span="3"></colgroup>
-  <thead>
-  <tr>
-
-
-    <th>Test Case</th>
-
-
-    <th>Action</th>
-
-
-    <th>Argument</th>
-
-
-    <th>Argument</th>
-
-
-    <th>Argument</th>
-
-
-
-
-  </tr>
-
-
-  </thead>
-  <tbody>
-
-
- <tr><td>Empty Metadata</td><td>[ Tags ]</td><td></td><td></td><td></td></tr><tr>
-
-
-      <td><br></td>
-
-
-      <td>[ Setup ]<br></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-
-
-    </tr>
-
-
-    <tr><td></td><td>NOOP</td><td></td><td></td><td></td></tr><tr>
-
-      <td align="undefined" valign="undefined"></td>
-
-      <td align="undefined" valign="undefined">[ Teardown ]</td>
-
-      <td align="undefined" valign="undefined"></td>
-
-      <td align="undefined" valign="undefined"></td>
-
-      <td align="undefined" valign="undefined"></td>
-
-    </tr>
-
-    <tr>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-
-
-    </tr>
-
-
-
-  </tbody>
-</table>
-
-
-
-<table border="1">
-
-
- <colgroup span="99"><col class="name"><col class="action"><col class="arg" span="3"></colgroup>
-  <thead>
-  <tr>
-
-
-    <th>Keyword</th>
-
-
-    <th>Action</th>
-
-
-    <th>Argument</th>
-
-
-    <th>Argument</th>
-
-
-    <th>Argument</th>
-
-
-  </tr>
-
-
-  </thead>
-  <tbody>
-
-
-    <tr>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
-    <tr>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
-
-  </tbody>
-</table>
-
-
-
-</body></html>
=======================================
--- /atest/testdata/public_api/testdata/everything.html Sat May 31 09:57:24 2008
+++ /dev/null
@@ -1,399 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-
-
-
-  <style type="text/css">
-html {
-  font-family: Arial,Helvetica,sans-serif;
-  background-color: white;
-  color: black;
-}
-p {
-  max-width: 60em;
-}
-table {
-  border-collapse: collapse;
-  empty-cells: show;
-  margin: 1em 0em;
-  border: 0.1em solid black;
-}
-th, td {
-  border-style: solid;
-  border-width: 0.05em 0.1em;
-  border-color: black;
-  padding: 0.1em 0.2em;
-  height: 1.5em;
-}
-th {
-  background-color: rgb(192, 192, 192);
-  color: black;
-  border-width: 0.1em;
-  font-weight: bold;
-  text-align: center;
-  text-transform: capitalize;
-  letter-spacing: 0.1em;
-}
-/* Widths of named columns */
-col.name {
-  width: 10em;
-}
-.action, .value, .arg {
-  width: 15em;
-}
-/* Properties for the name column
-- td:first-child should work in CSS 2.1 avare browsers (tested in Firefox)
-- col.name is against specs but works in IE
-*/
-td:first-child, col.name {
-  background-color: rgb(240, 240, 240);
-  text-transform: capitalize;
-  letter-spacing: 0.1em;
-}
-/* required for IE */
-th {
-  font-style: normal;
-}
-  </style>
-
-  <title>Robot Test Cases</title></head>
-<body>
-
-
-<h1>Robot Test Cases</h1>
-
-
-
-<table border="1">
-
-
- <colgroup span="99"><col class="name"><col class="value" span="4"></colgroup>
-  <thead>
-  <tr>
-
-
-    <th>Setting</th>
-
-
-    <th>Value</th>
-
-
-    <th>Value</th>
-
-
-    <th>value</th>
-
-
-    <th>Value</th>
-
-
-  </tr>
-
-
-  </thead>
-  <tbody>
-
-
- <tr><td>Documentation</td><td>Test cases for public API</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr>
-
-
-      <td>Suite Setup</td>
-
-
-      <td>My Suite Setup</td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
- <tr><td>Suite Teardown </td><td>My Suite Teardown</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Default Tags</td><td>default1</td><td></td><td></td><td></td></tr><tr><td>Force Tags</td><td>force1</td><td></td><td></td><td></td></tr><tr>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
- </tr><tr><td>Library</td><td>OperatingSystem</td><td></td><td></td><td></td></tr><tr><td>Resource</td><td>resource.html</td><td></td><td></td><td></td></tr><tr><td>Meta: My Meta</td><td>foo bar</td><td></td><td></td><td></td></tr><tr><td>Variables</td><td>vars.py</td><td></td><td></td><td></td></tr>
-
-
-
-  </tbody>
-</table>
-
-
-
-<table border="1">
-
-
- <colgroup span="99"><col class="name"><col class="value" span="4"></colgroup>
-  <thead>
-  <tr>
-
-
-    <th>Variable</th>
-
-
-    <th>Value</th>
-
-
-    <th>Value</th>
-
-
-    <th>Value</th>
-
-
-    <th>Value</th>
-
-
-  </tr>
-
-
-  </thead>
-  <tbody>
-
-
-    <tr>
-
-
-      <td>${SCALAR}</td>
-
-
-      <td>Hello, World!</td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
-    <tr>
-
-
-      <td>@{LIST}</td>
-
-
-      <td>1</td>
-
-
-      <td>2</td>
-
-
-      <td>3</td>
-
-
-      <td>4</td>
-
-
-    </tr>
-
-
-
-  <tr><td></td><td></td><td></td><td></td><td></td></tr></tbody>
-</table>
-
-
-
-<table border="1">
-
-
- <colgroup span="99"><col class="name"><col class="action"><col class="arg" span="3"></colgroup>
-  <thead>
-  <tr>
-
-
-    <th>Test Case</th>
-
-
-    <th>Action</th>
-
-
-    <th>Argument</th>
-
-
-    <th>Argument</th>
-
-
-    <th>Argument</th>
-
-
-
-
-  </tr>
-
-
-  </thead>
-  <tbody>
-
-
-    <tr>
-
-
-      <td>Passing test</td>
-
-
-      <td>[ Tags ]</td>
-
-
-      <td>tag1</td>
-
-
-      <td>tag2</td>
-
-
-      <td></td>
-
-
-
-
-    </tr>
-
-
-    <tr>
-
-      <td align="undefined" valign="undefined"></td>
-
-      <td align="undefined" valign="undefined">[ Setup ]</td>
-
-      <td align="undefined" valign="undefined">My Test Setup</td>
-
-      <td align="undefined" valign="undefined"></td>
-
-      <td align="undefined" valign="undefined"></td>
-
-    </tr>
-
- <tr><td></td><td>[ Documentation ]</td><td>This is a passing test</td><td></td><td></td></tr><tr><td></td><td>[ Teardown ]</td><td>My Test Teardown </td><td></td><td></td></tr><tr><td></td><td>Log</td><td>Hello World</td><td></td><td></td></tr><tr><td></td><td>Noop</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Failing Test</td><td></td><td></td><td></td><td></td></tr><tr>
-
-
-      <td></td>
-
-
-      <td>Fail</td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-
-
-    </tr>
-
-
-
-  </tbody>
-</table>
-
-
-
-<table border="1">
-
-
- <colgroup span="99"><col class="name"><col class="action"><col class="arg" span="3"></colgroup>
-  <thead>
-  <tr>
-
-
-    <th>Keyword</th>
-
-
-    <th>Action</th>
-
-
-    <th>Argument</th>
-
-
-    <th>Argument</th>
-
-
-    <th>Argument</th>
-
-
-  </tr>
-
-
-  </thead>
-  <tbody>
-
-
- <tr><td>My Suite Setup</td><td>Log</td><td>Hello from suite setup</td><td></td><td></td></tr><tr><td>My Suite Teardown</td><td>Log</td><td>Hello from suite teardown</td><td></td><td></td></tr><tr>
-
-
-      <td>My Test Setup</td>
-
-
-      <td>Log</td><td>Hello from test setup</td>
-
-
-
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
-    <tr>
-
-
-      <td>My Test Teardown </td>
-
-
-      <td>Log</td><td>Hello from test teardown</td>
-
-
-
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
-
-  </tbody>
-</table>
-
-
-
-</body></html>
=======================================
--- /atest/testdata/public_api/testdata/minimum.html Sat May 31 09:57:24 2008
+++ /dev/null
@@ -1,400 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-
-
-
-  <style type="text/css">
-html {
-  font-family: Arial,Helvetica,sans-serif;
-  background-color: white;
-  color: black;
-}
-p {
-  max-width: 60em;
-}
-table {
-  border-collapse: collapse;
-  empty-cells: show;
-  margin: 1em 0em;
-  border: 0.1em solid black;
-}
-th, td {
-  border-style: solid;
-  border-width: 0.05em 0.1em;
-  border-color: black;
-  padding: 0.1em 0.2em;
-  height: 1.5em;
-}
-th {
-  background-color: rgb(192, 192, 192);
-  color: black;
-  border-width: 0.1em;
-  font-weight: bold;
-  text-align: center;
-  text-transform: capitalize;
-  letter-spacing: 0.1em;
-}
-/* Widths of named columns */
-col.name {
-  width: 10em;
-}
-.action, .value, .arg {
-  width: 15em;
-}
-/* Properties for the name column
-- td:first-child should work in CSS 2.1 avare browsers (tested in Firefox)
-- col.name is against specs but works in IE
-*/
-td:first-child, col.name {
-  background-color: rgb(240, 240, 240);
-  text-transform: capitalize;
-  letter-spacing: 0.1em;
-}
-/* required for IE */
-th {
-  font-style: normal;
-}
-  </style>
-
-  <title>Robot Test Cases</title></head>
-
-<body>
-
-
-<h1>Robot Test Cases</h1>
-
-
-
-<table border="1">
-
-
- <colgroup span="99"><col class="name"><col class="value" span="4"></colgroup>
-  <thead>
-  <tr>
-
-
-    <th>Setting</th>
-
-
-    <th>Value</th>
-
-
-    <th>Value</th>
-
-
-    <th>value</th>
-
-
-    <th>Value</th>
-
-
-  </tr>
-
-
-  </thead>
-  <tbody>
-
-
-    <tr>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
-    <tr>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
-
-  </tbody>
-</table>
-
-
-
-<table border="1">
-
-
- <colgroup span="99"><col class="name"><col class="value" span="4"></colgroup>
-  <thead>
-  <tr>
-
-
-    <th>Variable</th>
-
-
-    <th>Value</th>
-
-
-    <th>Value</th>
-
-
-    <th>Value</th>
-
-
-    <th>Value</th>
-
-
-  </tr>
-
-
-  </thead>
-  <tbody>
-
-
-    <tr>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
-    <tr>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
-
-  </tbody>
-</table>
-
-
-
-<table border="1">
-
-
- <colgroup span="99"><col class="name"><col class="action"><col class="arg" span="3"></colgroup>
-  <thead>
-  <tr>
-
-
-    <th>Test Case</th>
-
-
-    <th>Action</th>
-
-
-    <th>Argument</th>
-
-
-    <th>Argument</th>
-
-
-    <th>Argument</th>
-
-
-
-
-  </tr>
-
-
-  </thead>
-  <tbody>
-
-
-    <tr>
-
-
-      <td>Test</td>
-
-
-      <td>NOOP</td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-
-
-    </tr>
-
-
-    <tr>
-
-      <td align="undefined" valign="undefined"></td>
-
-      <td align="undefined" valign="undefined"></td>
-
-      <td align="undefined" valign="undefined"></td>
-
-      <td align="undefined" valign="undefined"></td>
-
-      <td align="undefined" valign="undefined"></td>
-
-    </tr>
-
-    <tr>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-
-
-    </tr>
-
-
-
-  </tbody>
-</table>
-
-
-
-<table border="1">
-
-
- <colgroup span="99"><col class="name"><col class="action"><col class="arg" span="3"></colgroup>
-  <thead>
-  <tr>
-
-
-    <th>Keyword</th>
-
-
-    <th>Action</th>
-
-
-    <th>Argument</th>
-
-
-    <th>Argument</th>
-
-
-    <th>Argument</th>
-
-
-  </tr>
-
-
-  </thead>
-  <tbody>
-
-
-    <tr>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
-    <tr>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
-
-  </tbody>
-</table>
-
-
-
-</body></html>
=======================================
--- /atest/testdata/public_api/testdata/output_modified_suite_data.txt Wed May 26 00:04:48 2010
+++ /dev/null
@@ -1,14 +0,0 @@
-name|suite.name| Testdata | Empty Settings | Everything
-longname|suite.longname | Testdata | Testdata.Empty Settings | Testdata.Everything
-status | suite.status | PASS | PASS | PASS
-setup | suite.setup | None | None | N/A
-setup name | suite.setup.name | N/A | N/A | My Suite Setup
-teardown | suite.teardown | None | None | N/A
-teardown.name | suite.teardown.name | N/A | N/A | My Suite Teardown
-stat message| suite.get_stat_message() | 4 critical tests, 4 passed, 0 failed | 1 critical test, 1 passed, 0 failed | 2 critical tests, 2 passed, 0 failed -... | | 4 tests total, 4 passed, 0 failed | 1 test total, 1 passed, 0 failed | 2 tests total, 2 passed, 0 failed -critical stats passed| suite.critical_stats.passed | int(4) | int(1) | int(2) -critical stats failed| suite.critical_stats.failed | int(0) | int(0) | int(0) -subsuites| [ s.name for s in suite.suites ] | ['Empty Settings', 'Everything', 'Minimum'] | [] | [] -tests |[ t.name for t in suite.tests ] | [] | [ 'Empty Metadata' ] | [ 'Passing test', 'Failing Test' ]
-doc|suite.doc | '' | '' | Test cases for public API
=======================================
--- /atest/testdata/public_api/testdata/output_modified_test_data.txt Wed May 26 00:04:48 2010
+++ /dev/null
@@ -1,9 +0,0 @@
-name|test.name| Empty Metadata | Passing test | Failing Test | Test
-longname|test.longname | Testdata.Empty Settings.Empty Metadata | Testdata.Everything.Passing test | Testdata.Everything.Failing Test | Testdata.Minimum.Test
-status | test.status | PASS | PASS | PASS | PASS
-tags | test.tags | [] | ['force1', 'tag1', 'tag2'] | ['default1', 'force1'] | []
-setup | test.setup | None | N/A | None | None
-setup name | test.setup.name | N/A | My Test Setup | N/A | N/A
-teardown | test.teardown | None | N/A | None | None
-teardown name | test.teardown.name | N/A | My Test Teardown | N/A | N/A
-doc |test.doc |  | This is a passing test | |
=======================================
--- /atest/testdata/public_api/testdata/output_suite_data.txt Wed May 26 00:04:48 2010
+++ /dev/null
@@ -1,14 +0,0 @@
-name|suite.name| Testdata | Empty Settings | Everything
-longname|suite.longname | Testdata | Testdata.Empty Settings | Testdata.Everything
-status | suite.status | FAIL | PASS | FAIL
-setup | suite.setup | None | None | N/A
-setup name | suite.setup.name | N/A | N/A | My Suite Setup
-teardown | suite.teardown | None | None | N/A
-teardown.name | suite.teardown.name | N/A | N/A | My Suite Teardown
-stat message| suite.get_stat_message() | 4 critical tests, 3 passed, 1 failed | 1 critical test, 1 passed, 0 failed | 2 critical tests, 1 passed, 1 failed -... | | 4 tests total, 3 passed, 1 failed | 1 test total, 1 passed, 0 failed | 2 tests total, 1 passed, 1 failed -critical stats passed| suite.critical_stats.passed | int(3) | int(1) | int(1) -critical stats failed| suite.critical_stats.failed | int(1) | int(0) | int(1) -subsuites| [ s.name for s in suite.suites ] | ['Empty Settings', 'Everything', 'Minimum'] | [] | [] -tests |[ t.name for t in suite.tests ] | [] | [ 'Empty Metadata' ] | [ 'Passing test', 'Failing Test' ]
-doc|suite.doc | '' | '' | Test cases for public API
=======================================
--- /atest/testdata/public_api/testdata/output_test_data.txt Wed May 26 00:04:48 2010
+++ /dev/null
@@ -1,9 +0,0 @@
-name|test.name| Empty Metadata | Passing test | Failing Test | Test
-longname|test.longname | Testdata.Empty Settings.Empty Metadata | Testdata.Everything.Passing test | Testdata.Everything.Failing Test | Testdata.Minimum.Test
-status | test.status | PASS | PASS | FAIL | PASS
-tags | test.tags | [] | ['force1', 'tag1', 'tag2'] | ['default1', 'force1'] | []
-setup | test.setup | None | N/A | None | None
-setup name | test.setup.name | N/A | My Test Setup | N/A | N/A
-teardown | test.teardown | None | N/A | None | None
-teardown name | test.teardown.name | N/A | My Test Teardown | N/A | N/A
-doc |test.doc |  | This is a passing test | |
=======================================
--- /atest/testdata/public_api/testdata/resource.html Sat May 31 09:57:24 2008
+++ /dev/null
@@ -1,297 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-
-
-
-  <style type="text/css">
-html {
-  font-family: Arial,Helvetica,sans-serif;
-  background-color: white;
-  color: black;
-}
-p {
-  max-width: 60em;
-}
-table {
-  border-collapse: collapse;
-  empty-cells: show;
-  margin: 1em 0em;
-  border: 0.1em solid black;
-}
-th, td {
-  border-style: solid;
-  border-width: 0.05em 0.1em;
-  border-color: black;
-  padding: 0.1em 0.2em;
-  height: 1.5em;
-}
-th {
-  background-color: rgb(192, 192, 192);
-  color: black;
-  border-width: 0.1em;
-  font-weight: bold;
-  text-align: center;
-  text-transform: capitalize;
-  letter-spacing: 0.1em;
-}
-/* Widths of named columns */
-col.name {
-  width: 10em;
-}
-.action, .value, .arg {
-  width: 15em;
-}
-/* Properties for the name column
-- td:first-child should work in CSS 2.1 avare browsers (tested in Firefox)
-- col.name is against specs but works in IE
-*/
-td:first-child, col.name {
-  background-color: rgb(240, 240, 240);
-  text-transform: capitalize;
-  letter-spacing: 0.1em;
-}
-/* required for IE */
-th {
-  font-style: normal;
-}
-  </style>
-
-  <title>Robot Test Cases</title></head>
-<body>
-
-
-<h1>Robot Test Cases</h1>
-
-
-
-<table border="1">
-
-
- <colgroup span="99"><col class="name"><col class="value" span="4"></colgroup>
-  <thead>
-  <tr>
-
-
-    <th>Setting</th>
-
-
-    <th>Value</th>
-
-
-    <th>Value</th>
-
-
-    <th>value</th>
-
-
-    <th>Value</th>
-
-
-  </tr>
-
-
-  </thead>
-  <tbody>
-
-
-    <tr>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
-    <tr>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
-
-  </tbody>
-</table>
-
-
-
-<table border="1">
-
-
- <colgroup span="99"><col class="name"><col class="value" span="4"></colgroup>
-  <thead>
-  <tr>
-
-
-    <th>Variable</th>
-
-
-    <th>Value</th>
-
-
-    <th>Value</th>
-
-
-    <th>Value</th>
-
-
-    <th>Value</th>
-
-
-  </tr>
-
-
-  </thead>
-  <tbody>
-
-
-    <tr>
-
-
-      <td>${VAR}</td>
-
-
-      <td>Hello</td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
-    <tr>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
-
-  </tbody>
-</table><br><table border="1">
-
-
- <colgroup span="99"><col class="name"><col class="action"><col class="arg" span="3"></colgroup>
-  <thead>
-  <tr>
-
-
-    <th>Keyword</th>
-
-
-    <th>Action</th>
-
-
-    <th>Argument</th>
-
-
-    <th>Argument</th>
-
-
-    <th>Argument</th>
-
-
-  </tr>
-
-
-  </thead>
-  <tbody>
-
-
-    <tr>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
-    <tr>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-      <td></td>
-
-
-    </tr>
-
-
-
-  </tbody>
-</table>
-
-
-
-</body></html>
=======================================
--- /atest/testdata/public_api/testdata/run_suite_data.txt Wed May 26 00:04:48 2010
+++ /dev/null
@@ -1,13 +0,0 @@
-name|suite.name| Testdata | Empty Settings | Everything
-longname|suite.longname | Testdata | Testdata.Empty Settings | Testdata.Everything
-status | suite.status | FAIL | PASS | FAIL
-setup name | suite.setup.name | N/A | N/A | My Suite Setup
-teardown.name | suite.teardown.name | N/A | N/A | My Suite Teardown
-stat message| suite.get_stat_message() | 4 critical tests, 3 passed, 1 failed | 1 critical test, 1 passed, 0 failed | 2 critical tests, 1 passed, 1 failed -... | | 4 tests total, 3 passed, 1 failed | 1 test total, 1 passed, 0 failed | 2 tests total, 1 passed, 1 failed -critical stats passed| suite.critical_stats.passed | int(3) | int(1) | int(1) -critical stats failed| suite.critical_stats.failed | int(1) | int(0) | int(1) -#source| suite.source | os.path.abspath('testdata').lower() | ENDS = 'testdata'+os.path.sep+'empty_settings.html' | 'testdata'+os.path.sep+'everything.html' -subsuites| [ s.name for s in suite.suites ] | ['Empty Settings', 'Everything', 'Minimum'] | [] | [] -tests |[ t.name for t in suite.tests ] | [] | [ 'Empty Metadata' ] | [ 'Passing test', 'Failing Test' ]
-doc|suite.doc | '' | '' | Test cases for public API
=======================================
--- /atest/testdata/public_api/testdata/run_test_data.txt Wed May 26 00:04:48 2010
+++ /dev/null
@@ -1,7 +0,0 @@
-name|test.name| Empty Metadata | Passing test | Failing Test | Test
-longname|test.longname | Testdata.Empty Settings.Empty Metadata | Testdata.Everything.Passing test | Testdata.Everything.Failing Test | Testdata.Minimum.Test
-status | test.status | PASS | PASS | FAIL | PASS
-tags | test.tags | [] | ['force1', 'tag1', 'tag2'] | ['default1', 'force1'] | []
-setup name | test.setup.name | N/A | My Test Setup | N/A | N/A
-teardown name | test.teardown.name | N/A | My Test Teardown | N/A | N/A
-doc |test.doc |  | This is a passing test | |
=======================================
--- /atest/testdata/public_api/testdata/vars.py Sat May 31 09:57:24 2008
+++ /dev/null
@@ -1,1 +0,0 @@
-

==============================================================================
Revision: 95ec5999e3b3
Author:   Robot Framework Developers ([email protected])
Date:     Wed Nov 30 05:26:02 2011
Log:      simplify returning rc
http://code.google.com/p/robotframework/source/detail?r=95ec5999e3b3

Modified:
 /src/robot/__init__.py
 /src/robot/reporting/resultwriter.py

=======================================
--- /src/robot/__init__.py      Wed Nov 16 00:35:41 2011
+++ /src/robot/__init__.py      Wed Nov 30 05:26:02 2011
@@ -86,7 +86,7 @@

 def _execute(method, datasources, options):
     try:
-        suite, rc = method(*datasources, **options)
+        rc = method(*datasources, **options)
     except DataError, err:
         _report_error(unicode(err), help=True)
         return DATA_ERROR
@@ -132,7 +132,7 @@
         output, settings = settings.get_rebot_datasource_and_settings()
         RobotResultWriter(settings).write_results(output)
     LOGGER.close()
-    return suite, suite.return_code
+    return suite.return_code


 def run_rebot(*datasources, **options):
@@ -153,9 +153,9 @@
     settings = RebotSettings(options)
     LOGGER.register_console_logger(colors=settings['MonitorColors'])
     LOGGER.disable_message_cache()
-    result = RebotResultWriter(settings).write_results(*datasources)
+    rc = RebotResultWriter(settings).write_results(*datasources)
     LOGGER.close()
-    return result.suite, result.return_code
+    return rc


 def _report_error(message, details=None, help=False):
=======================================
--- /src/robot/reporting/resultwriter.py        Wed Nov 30 05:13:54 2011
+++ /src/robot/reporting/resultwriter.py        Wed Nov 30 05:26:02 2011
@@ -65,4 +65,4 @@
         XUnitBuilder(self).build()
         LogBuilder(self).build()
         ReportBuilder(self).build()
-        return self.result_from_xml
+        return self.result_from_xml.return_code

Reply via email to