fix: complete legacy CBB import recovery and guard late native submission
This commit is contained in:
1 parent
d36b6bcad0
commit
7527800128
12 files changed
+326
-25
No files matched your search
@@ -26,13 +26,21 @@ def test_layout_based_pcb_without_independent_icdb_directory_is_complete(healthy
|
||||
assert engineering_identity(source)['top_level_block'] == 'IP101GR'
|
||||
|
||||
|
||||
@pytest.mark.parametrize('missing', ['database/icdb.dat', 'PCB/Layout/LayoutDB.lyt', 'PCB/pcb.prj'])
|
||||
@pytest.mark.parametrize('missing', ['database/icdb.dat', 'PCB/Layout/LayoutDB.lyt'])
|
||||
def test_optional_pcb_icdb_does_not_relax_required_engineering_files(healthy_source, missing):
|
||||
(healthy_source.parent/missing).unlink()
|
||||
with pytest.raises(ValueError):
|
||||
source_project(healthy_source)
|
||||
|
||||
|
||||
def test_linked_legacy_pcb_uses_explicit_main_project_without_guessing_template(healthy_source):
|
||||
(healthy_source.parent/'PCB/pcb.prj').rename(healthy_source.parent/'PCB/template.prj')
|
||||
assert source_project(healthy_source)[0] == healthy_source
|
||||
(healthy_source.parent/'PCB/IP101GR.pcb').write_text('KEY ProjectFile "../wrong.prj"\n')
|
||||
with pytest.raises(ValueError, match='PCB'):
|
||||
source_project(healthy_source)
|
||||
|
||||
|
||||
def test_main_schematic_icdb_declaration_remains_required(healthy_source):
|
||||
text = healthy_source.read_text(encoding='utf-8').replace('KEY iCDBDir ".\\database"\n', '')
|
||||
healthy_source.write_text(text, encoding='utf-8')
|
||||
|
||||
Reference in new issue
Block a user