Status: Accepted
Owner: ----
Labels: Type-Defect Priority-High Target-2.5.4

New issue 654 by pekka.klarck: Some `BuiltIn` keywords (e.g. `Run Keyword`) can fail if `BuiltIn` module is imported before execution starts
http://code.google.com/p/robotframework/issues/detail?id=654

A test that worked with RF 2.1.x fails with RF 2.5.3 with the following traceback. I haven't been able to run the test in my machine, but it seems that when `BuiltIn.run_keyword` executes line `return kw.run(ExecutionContext(NAMESPACES.current, OUTPUT))` the `OUTPUT` is `None`. This `OUTPUT` is imported by `BuiltIn` and it is originally initialized in `robot.output` module to `None`. This problem is most likely caused by `BuiltIn` being imported by the test before `OUTPUT` is set to real value.

Traceback (most recent call last):
File "C:\USERS\work&training\TATESTCASE\trunk\ipamml1\IpaUnitTest\..\src\IpaMml\misc_lib\keyword.py", line 66, in wait_until_keyword_successful
   _run_keyword(keyword_name,  *args);
File "C:\USERS\work&training\TATESTCASE\trunk\ipamml1\IpaUnitTest\..\src\IpaMml\helper\__init__.py", line 423, in _run_keyword
   result = builtin.run_keyword(kw_name,  *args, **kwargs);
File "C:\Python25\Lib\site-packages\robot\libraries\BuiltIn.py", line 776, in run_keyword
   return kw.run(ExecutionContext(NAMESPACES.current, OUTPUT))
File "C:\Python25\Lib\site-packages\robot\running\keywords.py", line 72, in run
   handler = self._start(context)
File "C:\Python25\Lib\site-packages\robot\running\keywords.py", line 91, in _start
   context.start_keyword(self)
File "C:\Python25\Lib\site-packages\robot\running\context.py", line 83, in start_keyword
   self.output.start_keyword(keyword)
AttributeError: 'NoneType' object has no attribute 'start_keyword'

Reply via email to