Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Low Target-2.7 bwic
New issue 1016 by pekka.klarck: Variable Files should be always re-imported
from file system
http://code.google.com/p/robotframework/issues/detail?id=1016
Currently if same variable file is imported multiple times in the test
data, it is not actually re-imported from file system. This means that if
the variable file is changed dynamically, the changes are not noticed.
If a different file with same name is imported, re-importing the module is
forced by removing the original module from Python's module cache
(sys.modules). Detecting when the module should be removed from the cache
is also a little tricky and has caused issue 979. An easy solution to all
these problems, that also makes importing consistent, is always removing
the module.
Always re-importing the module may have performance drawbacks, though, if
importing the module is somehow expensive operation. It is very unlikely
that this would cause real life problems but I anyway mark this issue
backwards-incompatible.