[Tests] Adapted the KiCad config error tests to KiCad 7
This commit is contained in:
parent
2f903633e6
commit
cb58a72ebd
|
|
@ -0,0 +1 @@
|
||||||
|
6.0
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
6.0
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
6.0
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
6.0
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
6.0
|
||||||
|
|
@ -90,7 +90,9 @@ def test_kicad_conf_guess_libs(monkeypatch):
|
||||||
""" Check no HOME and fail to load kicad_common.
|
""" Check no HOME and fail to load kicad_common.
|
||||||
Also check we correctly guess the libs dir. """
|
Also check we correctly guess the libs dir. """
|
||||||
res = check_load_conf(fail=True, no_conf_path=True)
|
res = check_load_conf(fail=True, no_conf_path=True)
|
||||||
if context.ki6():
|
if context.ki7():
|
||||||
|
name = "KICAD7_SYMBOL_DIR"
|
||||||
|
elif context.ki6():
|
||||||
name = "KICAD6_SYMBOL_DIR"
|
name = "KICAD6_SYMBOL_DIR"
|
||||||
else:
|
else:
|
||||||
name = "KICAD_SYMBOL_DIR"
|
name = "KICAD_SYMBOL_DIR"
|
||||||
|
|
@ -99,7 +101,9 @@ def test_kicad_conf_guess_libs(monkeypatch):
|
||||||
|
|
||||||
def test_kicad_conf_lib_env(monkeypatch):
|
def test_kicad_conf_lib_env(monkeypatch):
|
||||||
""" Check we can use KICAD_SYMBOL_DIR as fallback """
|
""" Check we can use KICAD_SYMBOL_DIR as fallback """
|
||||||
if context.ki6():
|
if context.ki7():
|
||||||
|
name = "KICAD7_SYMBOL_DIR"
|
||||||
|
elif context.ki6():
|
||||||
name = "KICAD6_SYMBOL_DIR"
|
name = "KICAD6_SYMBOL_DIR"
|
||||||
else:
|
else:
|
||||||
name = "KICAD_SYMBOL_DIR"
|
name = "KICAD_SYMBOL_DIR"
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ if shutil.which(COVERAGE_SCRIPT) is None:
|
||||||
KICAD_PCB_EXT = '.kicad_pcb'
|
KICAD_PCB_EXT = '.kicad_pcb'
|
||||||
KICAD_VERSION_5_99 = 5099000
|
KICAD_VERSION_5_99 = 5099000
|
||||||
KICAD_VERSION_6_0_0 = 6000000
|
KICAD_VERSION_6_0_0 = 6000000
|
||||||
|
KICAD_VERSION_7_0_0 = 7000000
|
||||||
KICAD_VERSION_5_1_7 = 5001007
|
KICAD_VERSION_5_1_7 = 5001007
|
||||||
MODE_SCH = 1
|
MODE_SCH = 1
|
||||||
MODE_PCB = 0
|
MODE_PCB = 0
|
||||||
|
|
@ -77,6 +78,10 @@ else:
|
||||||
logging.debug('Detected KiCad v{}.{}.{} ({})'.format(kicad_major, kicad_minor, kicad_patch, kicad_version))
|
logging.debug('Detected KiCad v{}.{}.{} ({})'.format(kicad_major, kicad_minor, kicad_patch, kicad_version))
|
||||||
|
|
||||||
|
|
||||||
|
def ki7():
|
||||||
|
return kicad_version >= KICAD_VERSION_7_0_0
|
||||||
|
|
||||||
|
|
||||||
def ki6():
|
def ki6():
|
||||||
return kicad_version >= KICAD_VERSION_5_99
|
return kicad_version >= KICAD_VERSION_5_99
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue