From 63315d8b171d756e3febce825dac6cfca48fa8e0 Mon Sep 17 00:00:00 2001 From: Joey Vagedes Date: Thu, 7 Sep 2023 08:31:59 -0700 Subject: [PATCH] mend --- edk2toollib/database/tables/instanced_inf_table.py | 2 +- tests.unit/database/test_inf_table.py | 4 +++- tests.unit/database/test_instanced_inf_table.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/edk2toollib/database/tables/instanced_inf_table.py b/edk2toollib/database/tables/instanced_inf_table.py index 052e5e85..48264ed4 100644 --- a/edk2toollib/database/tables/instanced_inf_table.py +++ b/edk2toollib/database/tables/instanced_inf_table.py @@ -285,7 +285,7 @@ def _lib_to_instance(self, library_class_name, scope, library_dict, override_dic logging.debug(f'scoped library contents: {library_dict}') logging.debug(f'override dictionary: {override_dict}') e = f'Cannot find library class [{library_class_name}] for scope [{scope}] when evaluating {self.dsc}' - logging.warn(e) + logging.warning(e) return None def _reduce_lib_instances(self, module: str, library_instance_list: list[str]) -> str: diff --git a/tests.unit/database/test_inf_table.py b/tests.unit/database/test_inf_table.py index cc88cb93..a0bc9bb6 100644 --- a/tests.unit/database/test_inf_table.py +++ b/tests.unit/database/test_inf_table.py @@ -7,6 +7,8 @@ ## # ruff: noqa: F811 """Tests for build an inf file table.""" +from pathlib import Path + from common import Tree, empty_tree # noqa: F401 from edk2toollib.database import Edk2DB from edk2toollib.database.tables import InfTable @@ -51,7 +53,7 @@ def test_valid_inf(empty_tree: Tree): assert len(rows) == 2 for path, library_class in rows: - assert path in [lib1, lib2] + assert path in [Path(lib1).as_posix(), Path(lib2).as_posix()] assert library_class == "TestCls" for inf in [lib1, lib2]: diff --git a/tests.unit/database/test_instanced_inf_table.py b/tests.unit/database/test_instanced_inf_table.py index 04e80acd..d04dfc3c 100644 --- a/tests.unit/database/test_instanced_inf_table.py +++ b/tests.unit/database/test_instanced_inf_table.py @@ -141,7 +141,7 @@ def test_library_override(empty_tree: Tree): library_list = db.connection.cursor().execute(GET_USED_LIBRARIES_QUERY, ("TestDriver1", "IA32")) for path, in library_list: - assert path in [lib2, lib3] + assert path in [Path(lib2).as_posix(), Path(lib3).as_posix()] def test_scoped_libraries1(empty_tree: Tree): """Ensure that the correct libraries in regards to scoping.