summaryrefslogtreecommitdiff
path: root/gerber/tests/test_excellon_statements.py
diff options
context:
space:
mode:
authorPaulo Henrique Silva <ph.silva@gmail.com>2015-04-27 03:58:39 -0300
committerPaulo Henrique Silva <ph.silva@gmail.com>2015-04-27 04:01:48 -0300
commit21d963d244cbc762a736527b25cd8e82ff147f25 (patch)
tree6ecb9b4dcb94992a2ea4a08b1da1a86f53d7d01a /gerber/tests/test_excellon_statements.py
parente34e1078b67f43be9b678a67cf30d3c53fdea171 (diff)
downloadgerbonara-21d963d244cbc762a736527b25cd8e82ff147f25.tar.gz
gerbonara-21d963d244cbc762a736527b25cd8e82ff147f25.tar.bz2
gerbonara-21d963d244cbc762a736527b25cd8e82ff147f25.zip
Allow 3 digits on Excellon tool selection
Fritzing uses more than 2 digits for tool in their Excellons. To comply with that, I check specifically for 3 or less digits and use as tool number, more than that we treat as the standard (2 for tool and 2 for compensation index)
Diffstat (limited to 'gerber/tests/test_excellon_statements.py')
-rw-r--r--gerber/tests/test_excellon_statements.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gerber/tests/test_excellon_statements.py b/gerber/tests/test_excellon_statements.py
index 2da7c15..ada5194 100644
--- a/gerber/tests/test_excellon_statements.py
+++ b/gerber/tests/test_excellon_statements.py
@@ -111,6 +111,9 @@ def test_toolselection_factory():
stmt = ToolSelectionStmt.from_excellon('T0223')
assert_equal(stmt.tool, 2)
assert_equal(stmt.compensation_index, 23)
+ stmt = ToolSelectionStmt.from_excellon('T042')
+ assert_equal(stmt.tool, 42)
+ assert_equal(stmt.compensation_index, None)
def test_toolselection_dump():
""" Test ToolSelectionStmt to_excellon()