diff options
author | Paulo Henrique Silva <ph.silva@gmail.com> | 2016-11-16 23:54:09 -0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-16 23:54:09 -0200 |
commit | 521fe89150c6aaa0ff0954cc8d32e4b6f8009324 (patch) | |
tree | 59cef68f1449a5be8d2a9a8ed352e3d9974a3edb /gerber/tests/test_cam.py | |
parent | 7030eee5e28180732c5cf98aeda4b66657223870 (diff) | |
parent | 1e868763a1c4030bedd51553468cbe25f272bef9 (diff) | |
download | gerbonara-521fe89150c6aaa0ff0954cc8d32e4b6f8009324.tar.gz gerbonara-521fe89150c6aaa0ff0954cc8d32e4b6f8009324.tar.bz2 gerbonara-521fe89150c6aaa0ff0954cc8d32e4b6f8009324.zip |
Merge pull request #58 from garretfick/merge-curtacircuitos
Epic merge from @garretfick
Thanks a lot @garretfick and @hamiltonkibbe.
Diffstat (limited to 'gerber/tests/test_cam.py')
-rw-r--r-- | gerber/tests/test_cam.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gerber/tests/test_cam.py b/gerber/tests/test_cam.py index 2f0a905..ba5e99d 100644 --- a/gerber/tests/test_cam.py +++ b/gerber/tests/test_cam.py @@ -116,14 +116,22 @@ def test_zeros(): def test_filesettings_validation(): """ Test FileSettings constructor argument validation """ + # absolute-ish is not a valid notation assert_raises(ValueError, FileSettings, 'absolute-ish', 'inch', None, (2, 5), None) + + # degrees kelvin isn't a valid unit for a CAM file assert_raises(ValueError, FileSettings, 'absolute', 'degrees kelvin', None, (2, 5), None) + assert_raises(ValueError, FileSettings, 'absolute', 'inch', 'leading', (2, 5), 'leading') - assert_raises(ValueError, FileSettings, 'absolute', - 'inch', 'following', (2, 5), None) + + # Technnically this should be an error, but Eangle files often do this incorrectly so we + # allow it + #assert_raises(ValueError, FileSettings, 'absolute', + # 'inch', 'following', (2, 5), None) + assert_raises(ValueError, FileSettings, 'absolute', 'inch', None, (2, 5), 'following') assert_raises(ValueError, FileSettings, 'absolute', |