diff options
author | jaseg <git@jaseg.de> | 2023-03-31 22:31:58 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2023-03-31 22:31:58 +0200 |
commit | e1c40e8c80fae86239b67225ca6721266129e8de (patch) | |
tree | cbd5a8a1aacbf6e5b9c98b35038e5d787a661903 /gerbolyze | |
parent | 4a3a9f15820543790c7e7c4e9bcb6da6fea78033 (diff) | |
download | gerbolyze-e1c40e8c80fae86239b67225ca6721266129e8de.tar.gz gerbolyze-e1c40e8c80fae86239b67225ca6721266129e8de.tar.bz2 gerbolyze-e1c40e8c80fae86239b67225ca6721266129e8de.zip |
Fix failing tests
Diffstat (limited to 'gerbolyze')
-rwxr-xr-x | gerbolyze/__init__.py | 3 | ||||
-rw-r--r-- | gerbolyze/tests/resources/layers.svg | 10 | ||||
-rw-r--r-- | gerbolyze/tests/resources/svg_feature_test.svg | 8 | ||||
-rw-r--r-- | gerbolyze/tests/test_integration.py | 3 |
4 files changed, 13 insertions, 11 deletions
diff --git a/gerbolyze/__init__.py b/gerbolyze/__init__.py index 9cce66d..76cedd6 100755 --- a/gerbolyze/__init__.py +++ b/gerbolyze/__init__.py @@ -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 #============================ diff --git a/gerbolyze/tests/resources/layers.svg b/gerbolyze/tests/resources/layers.svg index 33ff4ab..76760ce 100644 --- a/gerbolyze/tests/resources/layers.svg +++ b/gerbolyze/tests/resources/layers.svg @@ -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" diff --git a/gerbolyze/tests/resources/svg_feature_test.svg b/gerbolyze/tests/resources/svg_feature_test.svg index 475dbc2..2b2c5b5 100644 --- a/gerbolyze/tests/resources/svg_feature_test.svg +++ b/gerbolyze/tests/resources/svg_feature_test.svg @@ -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" diff --git a/gerbolyze/tests/test_integration.py b/gerbolyze/tests/test_integration.py index f324096..cf59eed 100644 --- a/gerbolyze/tests/test_integration.py +++ b/gerbolyze/tests/test_integration.py @@ -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, |