summaryrefslogtreecommitdiff
path: root/gerber/tests/test_utils.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2015-02-02 11:42:47 -0500
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2015-02-02 11:42:47 -0500
commit1cc20b351c10b1fa19817f29edd8c54a27aeee4b (patch)
treec79265c665c37be7d85677836f9b7761a42fa1e9 /gerber/tests/test_utils.py
parentd98d23f8b5d61bb9d20e743a3c44bf04b6b2330a (diff)
downloadgerbonara-1cc20b351c10b1fa19817f29edd8c54a27aeee4b.tar.gz
gerbonara-1cc20b351c10b1fa19817f29edd8c54a27aeee4b.tar.bz2
gerbonara-1cc20b351c10b1fa19817f29edd8c54a27aeee4b.zip
tests
Diffstat (limited to 'gerber/tests/test_utils.py')
-rw-r--r--gerber/tests/test_utils.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/gerber/tests/test_utils.py b/gerber/tests/test_utils.py
index 1077022..1c3f1e5 100644
--- a/gerber/tests/test_utils.py
+++ b/gerber/tests/test_utils.py
@@ -4,7 +4,7 @@
# Author: Hamilton Kibbe <ham@hamiltonkib.be>
from .tests import assert_equal, assert_raises
-from ..utils import decimal_string, parse_gerber_value, write_gerber_value, detect_file_format
+from ..utils import *
def test_zero_suppression():
@@ -107,3 +107,11 @@ def test_detect_format_with_short_file():
""" Verify file format detection works with short files
"""
assert_equal('unknown', detect_file_format('gerber/tests/__init__.py'))
+
+def test_validate_coordinates():
+ assert_raises(TypeError, validate_coordinates, 3)
+ assert_raises(TypeError, validate_coordinates, 3.1)
+ assert_raises(TypeError, validate_coordinates, '14')
+ assert_raises(TypeError, validate_coordinates, (0,))
+ assert_raises(TypeError, validate_coordinates, (0,1,2))
+ assert_raises(TypeError, validate_coordinates, (0,'string'))