From b1be792c5200b6af58773486ac060e247e8c2514 Mon Sep 17 00:00:00 2001 From: jaseg Date: Fri, 10 Jun 2022 11:10:23 +0200 Subject: Fix tests --- gerbonara/tests/image_support.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gerbonara/tests') diff --git a/gerbonara/tests/image_support.py b/gerbonara/tests/image_support.py index f1d468c..0c47c8b 100644 --- a/gerbonara/tests/image_support.py +++ b/gerbonara/tests/image_support.py @@ -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: -- cgit