Skip to content

Commit 5de9da7

Browse files
committed
[* SCH Print][Fixed] Names of the multi file SCH
- Also adjusted the tests
1 parent 9c2839f commit 5de9da7

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

kibot/out_any_sch_print.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ def get_targets(self, out_dir):
147147
if self._pages:
148148
valid = {int(i) for i in self._pages.split(',')}
149149
valid.discard(1)
150-
extra_used = [get_base(s.fname) for s in GS.sch.all_sheets if int0(s.sheet) in valid]
150+
extra_used = [s.sheet_path_h.replace('/', '-') for s in GS.sch.all_sheets if int0(s.sheet) in valid]
151151
else:
152-
extra_used = [get_base(s.fname) for s in GS.sch.all_sheets if int0(s.sheet) != 1]
152+
extra_used = [s.sheet_path_h.replace('/', '-') for s in GS.sch.all_sheets if int0(s.sheet) != 1]
153153

154154
for f in extra_used:
155-
used.append(os.path.join(out_dir, GS.sch_basename+'-'+f+'.'+self._expand_ext))
155+
used.append(os.path.join(out_dir, GS.sch_basename+f+'.'+self._expand_ext))
156156

157157
return used
158158

tests/test_plot/test_misc.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import shutil
3434
import logging
3535
import pytest
36+
import shlex
3637
import subprocess
3738
import json
3839
from . import context
@@ -722,14 +723,14 @@ def check_makefile(ctx, mkfile, prj, dbg, txt):
722723
assert yaml in deps
723724
logging.debug('- Target `drill` OK')
724725
# svg_sch_def
725-
deps = targets['svg_sch_def'].split(' ')
726-
assert len(deps) == 1, deps
726+
deps = shlex.split(targets['svg_sch_def'])
727+
assert len(deps) == 5, deps
727728
assert ctx.get_out_path(prj+'.svg') in deps
728729
check_test_v5_sch_deps(ctx, targets[targets['svg_sch_def']].split(' '))
729730
logging.debug('- Target `svg_sch_def` OK')
730731
# svg_sch_int
731-
deps = targets['svg_sch_int'].split(' ')
732-
assert len(deps) == 1, deps
732+
deps = shlex.split(targets['svg_sch_int'])
733+
assert len(deps) == 5, deps
733734
assert ctx.get_out_path(prj+'-schematic.svg') in deps
734735
check_test_v5_sch_deps(ctx, targets[targets['svg_sch_int']].split(' '))
735736
logging.debug('- Target `svg_sch_int` OK')

0 commit comments

Comments
 (0)