summaryrefslogtreecommitdiff
path: root/gerber/tests/test_cam.py
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2016-07-16 15:49:48 +0800
committerGarret Fick <garret@ficksworkshop.com>2016-07-16 15:49:48 +0800
commit52c6d4928a1b5fc65b95cf5b0784a560cec2ca1d (patch)
tree7e117c69b2c2310926bf677f719bb7406c2e3e43 /gerber/tests/test_cam.py
parent09ebeb6e244ff91f20e1813bca51102fd2e1077f (diff)
downloadgerbonara-52c6d4928a1b5fc65b95cf5b0784a560cec2ca1d.tar.gz
gerbonara-52c6d4928a1b5fc65b95cf5b0784a560cec2ca1d.tar.bz2
gerbonara-52c6d4928a1b5fc65b95cf5b0784a560cec2ca1d.zip
Fix most broken tests so that I can safely merge into changes with known expected test result
Diffstat (limited to 'gerber/tests/test_cam.py')
-rw-r--r--gerber/tests/test_cam.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/gerber/tests/test_cam.py b/gerber/tests/test_cam.py
index 00a8285..3ae0a24 100644
--- a/gerber/tests/test_cam.py
+++ b/gerber/tests/test_cam.py
@@ -113,10 +113,19 @@ 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', 'inch', None, (2, 5, 6), None)