Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 1059 by [email protected]: Assignment of a variable using
extended variable syntax creates a new test variable with the same name
http://code.google.com/p/robotframework/issues/detail?id=1059
Attempting to assign a property of a Python object using the extended
variable syntax counter-intuitively creates a new test variable with the
same name as the extended variable.
Robot Framework 2.6.3 (Python 2.7.2 on win32)
Test suite:
*** Settings ***
Variables vars.py
*** Test Cases ***
Test Extended Variables
Should Be Equal ${foo.bar} hello
${foo.bar}= Set Variable goodbye
Should Be Equal ${foo.bar} goodbye
Should Be Equal ${foo.bar} ${foo.getbar()}
vars.py:
class Obj(object):
def __init__(self):
self.bar = "hello"
def getbar(self):
return self.bar
foo = Obj()
Test output:
=====================================================
Extended Variables
=====================================================
Test Extended Variables | FAIL |
goodbye != hello
Attachments:
Extended_Variables.txt 282 bytes
vars.py 134 bytes