[Tests][Add] Support for the nightly image
- It defines KICAD_PATH pointing to the nightly dir
This commit is contained in:
parent
f8cc0e29bb
commit
f603f8af7a
|
|
@ -73,8 +73,13 @@ def do_init():
|
||||||
|
|
||||||
if args.patch_get_path:
|
if args.patch_get_path:
|
||||||
with context.cover_it(cov):
|
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: ''):
|
with patch("sysconfig.get_path", lambda a, b=None: ''):
|
||||||
do_init()
|
do_init()
|
||||||
|
if old:
|
||||||
|
os.environ['KICAD_PATH'] = old
|
||||||
else:
|
else:
|
||||||
with context.cover_it(cov):
|
with context.cover_it(cov):
|
||||||
do_init()
|
do_init()
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,8 @@ def test_kicad_conf_guess_libs(monkeypatch):
|
||||||
name = "KICAD6_SYMBOL_DIR"
|
name = "KICAD6_SYMBOL_DIR"
|
||||||
else:
|
else:
|
||||||
name = "KICAD_SYMBOL_DIR"
|
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):
|
def test_kicad_conf_lib_env(monkeypatch):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue