[Tests] Adapted to the new lib table parser

This commit is contained in:
Salvador E. Tropea 2023-03-01 07:47:55 -03:00
parent 818b431cac
commit 4fe0c9dbd4
2 changed files with 4 additions and 2 deletions

View File

@ -67,6 +67,8 @@ def do_init():
KiConf.init(os.path.join(context.BOARDS_DIR, 'v5_errors/kibom-test.sch'))
# Check we can call it again and nothing is done
KiConf.init('bogus')
# Try to load the sym-lib-table
KiConf.get_sym_lib_aliases()
if args.patch_get_path:

View File

@ -119,7 +119,7 @@ def test_kicad_conf_sym_err_1(monkeypatch):
with monkeypatch.context() as m:
m.setenv("KICAD_CONFIG_HOME", 'tests/data/kicad_err_1')
res = check_load_conf(dir='kicad_err_1', catch_conf_error=True)
assert "raise KiConfError('Symbol libs table missing signature" in res, res
assert "Too many closing brackets. Expected no character left in the sexp" in res, res
def test_kicad_conf_sym_err_2(monkeypatch):
@ -128,7 +128,7 @@ def test_kicad_conf_sym_err_2(monkeypatch):
with monkeypatch.context() as m:
m.setenv("KICAD_CONFIG_HOME", 'tests/data/kicad_err_2')
res = check_load_conf(dir='kicad_err_2', catch_conf_error=True)
assert "raise KiConfError('Unknown symbol table entry" in res, res
assert "Unknown lib table entry" in res, res
def mocked_get_path_1(name, scheme):