Fix tests
Some checks failed
pcb-tools / test (3.5) (push) Has been cancelled
pcb-tools / test (3.6) (push) Has been cancelled
pcb-tools / test (3.7) (push) Has been cancelled
pcb-tools / test (3.8) (push) Has been cancelled
pcb-tools / coverage (push) Has been cancelled

This commit is contained in:
jaseg 2022-06-10 11:10:23 +02:00
parent 460ea625af
commit b1be792c52
3 changed files with 9 additions and 3 deletions

View file

@ -23,7 +23,7 @@ from dataclasses import dataclass, KW_ONLY, replace
from .utils import *
prec = lambda x: f'{x:.6}'
prec = lambda x: f'{float(x):.6}'
@dataclass

View file

@ -345,7 +345,7 @@ class LayerStack:
layer = LazyCamFile(GerberFile, path)
if not lazy:
layer = layer.open()
layer = layer.instance
if key == 'mechanical outline':
layers['mechanical', 'outline'] = layer

View file

@ -172,7 +172,13 @@ def gerber_difference(reference, actual, diff_out=None, svg_transform=None, size
with svg_soup(ref_svg.name) as soup:
if svg_transform is not None:
soup.find('g', attrs={'id': 'surface1'})['transform'] = svg_transform
svg = soup.svg
children = list(svg.children)
g = soup.new_tag('g', attrs={'transform': svg_transform})
for c in children:
g.append(c.extract())
svg.append(g)
cleanup_gerbv_svg(soup)
with svg_soup(act_svg.name) as soup: