Status: New
Owner: ----
Labels: Type-Enhancement Priority-Medium
New issue 1329 by [email protected]: Allow "from <module> import <Library>"
for Library imports
http://code.google.com/p/robotframework/issues/detail?id=1329
The ability to manage the namespace scope of Library imports would be very
useful. I have found it difficult to compare certain kinds of python
objects that are not part of the standard library. The best example is
OrderedDict. OrderedDict's can be imported into the namespace directly in
python code with:
from collections import OrderedDict
However when I go to test these objects in robot (using 'should be equal'
or 'evaluate') I encounter the following error:
NameError: name 'OrderedDict' is not defined
It is possible with 'Evaluate' to add module imports, but not in the 'from
X import Y' format. The only way to import OrderedDict's is 'import
collections.OrderedDict', however this results in a namespace conflict
and 'OrderedDict' is still not resolved.
It would be nice to be able to have more control over the namespace related
to module imports with Robot.