kopia lustrzana https://github.com/jaseg/gerbolyze
Fix failing tests
rodzic
4a3a9f1582
commit
e1c40e8c80
|
@ -266,7 +266,7 @@ def convert(input_svg, output_gerbers, is_zip, dilate, curve_tolerance, no_subtr
|
|||
subtract_map = parse_subtract_script('' if no_subtract else subtract, dilate, default_script=DEFAULT_CONVERT_SUB_SCRIPT)
|
||||
output_is_zip = output_gerbers.name.lower().endswith('.zip') if is_zip is None else is_zip
|
||||
|
||||
stack = gn.LayerStack({}, [], board_name=input_svg.stem, original_path=input_svg)
|
||||
stack = gn.LayerStack({}, None, None, [], board_name=input_svg.stem, original_path=input_svg)
|
||||
|
||||
for group_id, label in get_layers_from_svg(input_svg.read_text()):
|
||||
if not group_id or not label or 'no export' in label:
|
||||
|
@ -326,7 +326,6 @@ def convert(input_svg, output_gerbers, is_zip, dilate, curve_tolerance, no_subtr
|
|||
stack.save_to_directory(output_gerbers, naming_scheme=naming_scheme)
|
||||
|
||||
|
||||
|
||||
# Subtraction script handling
|
||||
#============================
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
id="rect1146-5" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
inkscape:current-layer="g-plated-drill"
|
||||
inkscape:current-layer="g-drill-plated"
|
||||
id="namedview4"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
|
@ -555,8 +555,8 @@
|
|||
ry="3.894336" />
|
||||
</g>
|
||||
<g
|
||||
id="g-plated-drill"
|
||||
inkscape:label="plated drill"
|
||||
id="g-drill-plated"
|
||||
inkscape:label="drill plated"
|
||||
inkscape:groupmode="layer">
|
||||
<g
|
||||
id="g3914"
|
||||
|
@ -1637,8 +1637,8 @@
|
|||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g-nonplated-drill"
|
||||
inkscape:label="nonplated drill"
|
||||
id="g-drill-nonplated"
|
||||
inkscape:label="drill nonplated"
|
||||
inkscape:groupmode="layer">
|
||||
<g
|
||||
id="g3736"
|
||||
|
|
Przed Szerokość: | Wysokość: | Rozmiar: 188 KiB Po Szerokość: | Wysokość: | Rozmiar: 188 KiB |
|
@ -904,12 +904,12 @@
|
|||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g-plated-drill"
|
||||
inkscape:label="plated drill"
|
||||
id="g-drill-plated"
|
||||
inkscape:label="drill plated"
|
||||
inkscape:groupmode="layer" />
|
||||
<g
|
||||
id="g-nonplated-drill"
|
||||
inkscape:label="nonplated drill"
|
||||
id="g-drill-nonplated"
|
||||
inkscape:label="drill nonplated"
|
||||
inkscape:groupmode="layer" />
|
||||
<g
|
||||
id="g-comments"
|
||||
|
|
Przed Szerokość: | Wysokość: | Rozmiar: 33 KiB Po Szerokość: | Wysokość: | Rozmiar: 33 KiB |
|
@ -33,6 +33,8 @@ reference_path = lambda reference: Path(__file__).parent / 'resources' / str(ref
|
|||
def run_command(*args):
|
||||
try:
|
||||
proc = subprocess.run(args, check=True, capture_output=True)
|
||||
print(proc.stdout.decode())
|
||||
print(proc.stderr.decode(), file=sys.stderr)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(e.stdout.decode())
|
||||
print(e.stderr.decode(), file=sys.stderr)
|
||||
|
@ -69,6 +71,7 @@ def test_convert_layers():
|
|||
with tempfile.TemporaryDirectory() as out_dir:
|
||||
run_command('python3', '-m', 'gerbolyze', 'convert', infile, out_dir)
|
||||
stack = gerbonara.layers.LayerStack.open(out_dir)
|
||||
|
||||
for layer, dia in {
|
||||
'top paste': 0.100,
|
||||
'top silk': 0.110,
|
||||
|
|
Ładowanie…
Reference in New Issue