diff options
author | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2015-01-25 14:19:48 -0500 |
---|---|---|
committer | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2015-01-25 14:19:48 -0500 |
commit | b495d51354eff7b858dbbd41740865eba7f39100 (patch) | |
tree | 4e418b6d508b4390354231d5f5c7360142b2b783 /gerber/tests/test_cam.py | |
parent | d5157c1d076360e3702a910f119b9fc44ff76df5 (diff) | |
download | gerbonara-b495d51354eff7b858dbbd41740865eba7f39100.tar.gz gerbonara-b495d51354eff7b858dbbd41740865eba7f39100.tar.bz2 gerbonara-b495d51354eff7b858dbbd41740865eba7f39100.zip |
Changed zeros/zero suppression conventions to match file format specs
Diffstat (limited to 'gerber/tests/test_cam.py')
-rw-r--r-- | gerber/tests/test_cam.py | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/gerber/tests/test_cam.py b/gerber/tests/test_cam.py index ce4ec44..1aeb18c 100644 --- a/gerber/tests/test_cam.py +++ b/gerber/tests/test_cam.py @@ -64,5 +64,28 @@ def test_camfile_settings(): """ cf = CamFile() assert_equal(cf.settings, FileSettings()) - -
\ No newline at end of file + +def test_zeros(): + + fs = FileSettings() + assert_equal(fs.zero_suppression, 'trailing') + assert_equal(fs.zeros, 'leading') + + + fs['zero_suppression'] = 'leading' + assert_equal(fs.zero_suppression, 'leading') + assert_equal(fs.zeros, 'trailing') + + fs.zero_suppression = 'trailing' + assert_equal(fs.zero_suppression, 'trailing') + assert_equal(fs.zeros, 'leading') + + fs['zeros'] = 'trailing' + assert_equal(fs.zeros, 'trailing') + assert_equal(fs.zero_suppression, 'leading') + + + fs.zeros= 'leading' + assert_equal(fs.zeros, 'leading') + assert_equal(fs.zero_suppression, 'trailing') + |