meta: cache list of runners
Instead of enumerating all existing runners -- doing i/o -- we cache the list at the `Index` level.
This commit is contained in:
parent
c755068bd2
commit
683a8cbfa7
2 changed files with 10 additions and 8 deletions
|
|
@ -64,8 +64,6 @@ def test_runner_detection(tempdir):
|
|||
runners = os.path.join(tempdir, "runners")
|
||||
os.makedirs(runners)
|
||||
|
||||
meta = osbuild.meta.Index(tempdir)
|
||||
|
||||
table = {
|
||||
"arch": {
|
||||
"base": "",
|
||||
|
|
@ -102,6 +100,7 @@ def test_runner_detection(tempdir):
|
|||
base = info["base"] or 0
|
||||
versions = info["versions"]
|
||||
want = create_runners(runners, distro, str(base), versions)
|
||||
meta = osbuild.meta.Index(tempdir)
|
||||
have = meta.list_runners(distro)
|
||||
assert len(want) == len(have)
|
||||
want_all += want
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue