[Tests][Add] Support for the nightly image

- It defines KICAD_PATH pointing to the nightly dir
This commit is contained in:
Salvador E. Tropea 2023-04-18 11:25:51 -03:00
parent f8cc0e29bb
commit f603f8af7a
2 changed files with 7 additions and 1 deletions

View File

@ -73,8 +73,13 @@ def do_init():
if args.patch_get_path:
with context.cover_it(cov):
old = os.environ.get('KICAD_PATH')
if old:
del os.environ['KICAD_PATH']
with patch("sysconfig.get_path", lambda a, b=None: ''):
do_init()
if old:
os.environ['KICAD_PATH'] = old
else:
with context.cover_it(cov):
do_init()

View File

@ -92,7 +92,8 @@ def test_kicad_conf_guess_libs(monkeypatch):
name = "KICAD6_SYMBOL_DIR"
else:
name = "KICAD_SYMBOL_DIR"
assert 'Using {}="/usr/share/kicad/'.format(name) in res, res
assert ('Using {}="/usr/share/kicad/'.format(name) in res or
'Using {}="/usr/share/kicad-nightly/'.format(name) in res), res
def test_kicad_conf_lib_env(monkeypatch):