diff options
author | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2014-10-19 22:23:00 -0400 |
---|---|---|
committer | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2014-10-19 22:23:00 -0400 |
commit | 18e3b87625ddb739faeddffcaed48e12db6c7e8b (patch) | |
tree | 8b27aa49e431d67e4940d053c2fd640854bd945a /gerber/tests/test_cam.py | |
parent | 6d2db67e6d0973ce26ce3a6700ca44295f73fea7 (diff) | |
download | gerbonara-18e3b87625ddb739faeddffcaed48e12db6c7e8b.tar.gz gerbonara-18e3b87625ddb739faeddffcaed48e12db6c7e8b.tar.bz2 gerbonara-18e3b87625ddb739faeddffcaed48e12db6c7e8b.zip |
Test update
Diffstat (limited to 'gerber/tests/test_cam.py')
-rw-r--r-- | gerber/tests/test_cam.py | 52 |
1 files changed, 35 insertions, 17 deletions
diff --git a/gerber/tests/test_cam.py b/gerber/tests/test_cam.py index 4af1984..ce4ec44 100644 --- a/gerber/tests/test_cam.py +++ b/gerber/tests/test_cam.py @@ -7,12 +7,6 @@ from ..cam import CamFile, FileSettings from tests import * -def test_smoke_filesettings(): - """ Smoke test FileSettings class - """ - fs = FileSettings() - - def test_filesettings_defaults(): """ Test FileSettings default values """ @@ -37,14 +31,38 @@ def test_filesettings_assign(): """ Test FileSettings attribute assignment """ fs = FileSettings() - fs.units = 'test' - fs.notation = 'test' - fs.zero_suppression = 'test' - fs.format = 'test' - assert_equal(fs.units, 'test') - assert_equal(fs.notation, 'test') - assert_equal(fs.zero_suppression, 'test') - assert_equal(fs.format, 'test') - -def test_smoke_camfile(): - cf = CamFile + fs.units = 'test1' + fs.notation = 'test2' + fs.zero_suppression = 'test3' + fs.format = 'test4' + assert_equal(fs.units, 'test1') + assert_equal(fs.notation, 'test2') + assert_equal(fs.zero_suppression, 'test3') + assert_equal(fs.format, 'test4') + + +def test_filesettings_dict_assign(): + """ Test FileSettings dict-style attribute assignment + """ + fs = FileSettings() + fs['units'] = 'metric' + fs['notation'] = 'incremental' + fs['zero_suppression'] = 'leading' + fs['format'] = (1, 2) + assert_equal(fs.units, 'metric') + assert_equal(fs.notation, 'incremental') + assert_equal(fs.zero_suppression, 'leading') + assert_equal(fs.format, (1, 2)) + +def test_camfile_init(): + """ Smoke test CamFile test + """ + cf = CamFile() + +def test_camfile_settings(): + """ Test CamFile Default Settings + """ + cf = CamFile() + assert_equal(cf.settings, FileSettings()) + +
\ No newline at end of file |