summaryrefslogtreecommitdiff
path: root/gerber/tests/test_gerber_statements.py
diff options
context:
space:
mode:
authorPaulo Henrique Silva <ph.silva@gmail.com>2015-11-23 16:02:16 -0200
committerPaulo Henrique Silva <ph.silva@gmail.com>2015-11-23 16:04:25 -0200
commit2e2b4e49c3182cc7385f12d760222ecb57cc1356 (patch)
tree75be12f922c74b7fe9f78aca7a966c202a5d4e86 /gerber/tests/test_gerber_statements.py
parentba82d60cb8a886a82d4c4199473bb1189efc6419 (diff)
downloadgerbonara-2e2b4e49c3182cc7385f12d760222ecb57cc1356.tar.gz
gerbonara-2e2b4e49c3182cc7385f12d760222ecb57cc1356.tar.bz2
gerbonara-2e2b4e49c3182cc7385f12d760222ecb57cc1356.zip
Fix AMParamStmt to_gerber to write changes back.
AMParamStmt was not calling to_gerber on each of its primitives on his own to_gerber method. That way primitives that changes after reading, such as when you call to_inch/to_metric was failing because it was writing only the original macro back.
Diffstat (limited to 'gerber/tests/test_gerber_statements.py')
-rw-r--r--gerber/tests/test_gerber_statements.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gerber/tests/test_gerber_statements.py b/gerber/tests/test_gerber_statements.py
index b5c20b1..79ce76b 100644
--- a/gerber/tests/test_gerber_statements.py
+++ b/gerber/tests/test_gerber_statements.py
@@ -446,11 +446,11 @@ def testAMParamStmt_conversion():
def test_AMParamStmt_dump():
name = 'POLYGON'
- macro = '5,1,8,25.4,25.4,25.4,0'
+ macro = '5,1,8,25.4,25.4,25.4,0.0'
s = AMParamStmt.from_dict({'param': 'AM', 'name': name, 'macro': macro })
s.build()
- assert_equal(s.to_gerber(), '%AMPOLYGON*5,1,8,25.4,25.4,25.4,0*%')
+ assert_equal(s.to_gerber(), '%AMPOLYGON*5,1,8,25.4,25.4,25.4,0.0*%')
def test_AMParamStmt_string():
name = 'POLYGON'