diff options
author | jaseg <git@jaseg.de> | 2022-02-06 01:10:17 +0100 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2022-02-06 01:10:17 +0100 |
commit | 263617ca754fc7b3fc550a33934fcbcbe5ef8acf (patch) | |
tree | 48bee309f4311a030cae5ed518d6499a93edfb8b /gerbonara/tests/test_excellon.py | |
parent | 5c4e18031623207b31855ff58be6b4c907962474 (diff) | |
download | gerbonara-263617ca754fc7b3fc550a33934fcbcbe5ef8acf.tar.gz gerbonara-263617ca754fc7b3fc550a33934fcbcbe5ef8acf.tar.bz2 gerbonara-263617ca754fc7b3fc550a33934fcbcbe5ef8acf.zip |
Add Zuken tests and fix parsing
Diffstat (limited to 'gerbonara/tests/test_excellon.py')
-rw-r--r-- | gerbonara/tests/test_excellon.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gerbonara/tests/test_excellon.py b/gerbonara/tests/test_excellon.py index 3b0418d..3221439 100644 --- a/gerbonara/tests/test_excellon.py +++ b/gerbonara/tests/test_excellon.py @@ -48,6 +48,8 @@ REFERENCE_FILES = { 'diptrace/mainboard.drl': (None, 'diptrace/mainboard_Top.gbr'), 'diptrace/panel.drl': (None, None), 'diptrace/keyboard.drl': (None, 'diptrace/keyboard_Bottom.gbr'), + 'zuken-emulated/Drill/8seg_Driver__routed_Drill_thru_plt.fdr/8seg_Driver__routed_Drill_thru_plt.fdr': (('inch', 'trailing', 4), 'zuken-emulated/Gerber/Conductive-1.fph'), + 'zuken-emulated/Drill/8seg_Driver__routed_Drill_thru_nplt.fdr': (('inch', 'trailing', 4), None), } @filter_syntax_warnings @@ -105,8 +107,12 @@ def test_idempotence(reference, tmpfile): tmp_1 = tmpfile('First generation output', '.drl') tmp_2 = tmpfile('Second generation output', '.drl') - ExcellonFile.open(reference).save(tmp_1) - ExcellonFile.open(tmp_1).save(tmp_2) + f1 = ExcellonFile.open(reference) + f1.save(tmp_1) + print(f'{f1.import_settings=}') + f2 = ExcellonFile.open(tmp_1) + f2.save(tmp_2) + print(f'{f2.import_settings=}') assert tmp_1.read_text() == tmp_2.read_text() @@ -125,7 +131,7 @@ def test_gerber_alignment(reference, tmpfile, print_on_error): gerf = GerberFile.open(gerf_path) print('bounds excellon:', excf.bounding_box(MM)) print('bounds gerber:', gerf.bounding_box(MM)) - excf.save('/tmp/test.xnc') + excf.save(tmp) flash_coords = [] for obj in gerf.objects: |