mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
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>
This commit is contained in:
parent
5a3f222604
commit
4d5994f91c
3 changed files with 10 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue