diff options
author | Simon Glass <sjg@chromium.org> | 2017-11-12 21:52:20 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-11-22 18:05:38 -0700 |
commit | 4d5994f91c5c781fb0c8b32b58abfc4d9d2ec878 (patch) | |
tree | 6c37ad79e68d7e2a4971dd04304370bd0079eeac /tools/binman/image.py | |
parent | 5a3f2226043cd46d446ab6eba39e47d131b47175 (diff) | |
download | u-boot-4d5994f91c5c781fb0c8b32b58abfc4d9d2ec878.tar.gz |
binman: Set up 'entry' to permit full test coverage
There is a little check at the top of entry.py which decides if importlib
is available. At present this has no test coverage. To add this we will
need to import the module twice, once with importlib and once without.
In preparation for allowing a test to control the importing of this
module, remove all global imports of the 'entry' module.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/image.py')
-rw-r--r-- | tools/binman/image.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/binman/image.py b/tools/binman/image.py index 07fc930665..24c4f6f578 100644 --- a/tools/binman/image.py +++ b/tools/binman/image.py @@ -9,8 +9,6 @@ from collections import OrderedDict from operator import attrgetter -import entry -from entry import Entry import fdt_util import tools @@ -48,6 +46,11 @@ class Image: _entries: OrderedDict() of entries """ def __init__(self, name, node): + global entry + global Entry + import entry + from entry import Entry + self._node = node self._name = name self._size = None |