Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 588 by kiwitargetgranule: import library with exception in
__init__ do not stop test execution
http://code.google.com/p/robotframework/issues/detail?id=588
Robot Framework 2.5 (Python 2.5.2 on linux2)
===Library
class test:
ROBOT_LIBRARY_SCOPE = 'GLOBAL'
ROBOT_LIBRARY_VERSION = '0'
def __init__(self):
"2"+2
====Test suite
*Setting* *Value* *Value* *Value* *Value* *Value* *Value* *Value*
Library ./test.py
*Test Case* *Action* *Argument* *Argument*
*Argument* *Argument* *Argument* *Argument*
1 Log koko
===Result
t...@tde-laptop:~/vld/trunk/VSV_RFW$ pybot VSV/foo.tsv
[ ERROR ] Invalid syntax in file '/home/tde/vld/trunk/VSV_RFW/VSV/foo.tsv'
in table 'Setting': Creating an instance of the test library 'test' with no
arguments failed: TypeError: cannot concatenate 'str' and 'int' objects
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/robot/running/testlibraries.py",
line 149, in _get_instance
return self._libcode(*self.positional_args, **self.named_args)
File "/home/tde/vld/trunk/VSV_RFW/test.py", line 5, in __init__
"2"+2
==============================================================================
Foo
==============================================================================
1 |
PASS |
------------------------------------------------------------------------------
Foo |
PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
Output: /home/tde/vld/trunk/VSV_RFW/output.xml
Report: /home/tde/vld/trunk/VSV_RFW/report.html
Log: /home/tde/vld/trunk/VSV_RFW/log.html
===Excpected
if init raise an exception in init, all the tests case of test suite failed.