diff options
author | Garret Fick <garret@ficksworkshop.com> | 2016-07-24 22:08:31 +0800 |
---|---|---|
committer | Garret Fick <garret@ficksworkshop.com> | 2016-07-24 22:08:31 +0800 |
commit | 965d3ce23b92f8aff1063debd6d3364de15791fe (patch) | |
tree | 304ac755578479554ed812da87c782e9f6772582 /gerber/tests/test_cairo_backend.py | |
parent | 7cd6acf12670f3773113f67ed2acb35cb21c32a0 (diff) | |
download | gerbonara-965d3ce23b92f8aff1063debd6d3364de15791fe.tar.gz gerbonara-965d3ce23b92f8aff1063debd6d3364de15791fe.tar.bz2 gerbonara-965d3ce23b92f8aff1063debd6d3364de15791fe.zip |
Add more tests for rendering to PNG. Start adding tests for rendering to Gerber format. Changed definition of no hole to use None instead of 0 so we can differentiate when writing to Gerber format. Makde polygon use hole diameter instead of hole radius to match other primitives
Diffstat (limited to 'gerber/tests/test_cairo_backend.py')
-rw-r--r-- | gerber/tests/test_cairo_backend.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gerber/tests/test_cairo_backend.py b/gerber/tests/test_cairo_backend.py index 38cffba..f358235 100644 --- a/gerber/tests/test_cairo_backend.py +++ b/gerber/tests/test_cairo_backend.py @@ -6,7 +6,7 @@ import io import os from ..render.cairo_backend import GerberCairoContext -from ..rs274x import read, GerberFile +from ..rs274x import read from .tests import * from nose.tools import assert_tuple_equal @@ -121,7 +121,20 @@ def test_flash_obround(): def test_flash_polygon(): """Umaco example a simple polygon flash with and without a hole""" - _test_render('resources/example_flash_polygon.gbr', 'golden/example_flash_polygon.png', 'golden/example_flash_polygon.png') + _test_render('resources/example_flash_polygon.gbr', 'golden/example_flash_polygon.png') + + +def test_holes_dont_clear(): + """Umaco example that an aperture with a hole does not clear the area""" + + _test_render('resources/example_holes_dont_clear.gbr', 'golden/example_holes_dont_clear.png') + + +def test_render_am_exposure_modifier(): + """Umaco example that an aperture macro with a hole does not clear the area""" + + _test_render('resources/example_am_exposure_modifier.gbr', 'golden/example_am_exposure_modifier.png') + def _resolve_path(path): return os.path.join(os.path.dirname(__file__), |