summaryrefslogtreecommitdiff
path: root/gerber/tests/tests.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2016-11-05 21:11:09 -0400
committerGitHub <noreply@github.com>2016-11-05 21:11:09 -0400
commitd2fe4441662435e55f2dc481bf94a2729b9d6a48 (patch)
treedd60a0b21e1d1ca7258b9f978ce973354d96062c /gerber/tests/tests.py
parent318a81382e074a5897489299a58e029815d23492 (diff)
parent5af19af190c1fb0f0c5be029d46d63e657dde4d9 (diff)
downloadgerbonara-d2fe4441662435e55f2dc481bf94a2729b9d6a48.tar.gz
gerbonara-d2fe4441662435e55f2dc481bf94a2729b9d6a48.tar.bz2
gerbonara-d2fe4441662435e55f2dc481bf94a2729b9d6a48.zip
Merge pull request #3 from garretfick/merge-curtacircuitos
Merge curtacircuitos
Diffstat (limited to 'gerber/tests/tests.py')
-rw-r--r--gerber/tests/tests.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/gerber/tests/tests.py b/gerber/tests/tests.py
index 29b7899..ac08208 100644
--- a/gerber/tests/tests.py
+++ b/gerber/tests/tests.py
@@ -7,6 +7,7 @@ from nose.tools import assert_in
from nose.tools import assert_not_in
from nose.tools import assert_equal
from nose.tools import assert_not_equal
+from nose.tools import assert_almost_equal
from nose.tools import assert_true
from nose.tools import assert_false
from nose.tools import assert_raises
@@ -14,5 +15,11 @@ from nose.tools import raises
from nose import with_setup
__all__ = ['assert_in', 'assert_not_in', 'assert_equal', 'assert_not_equal',
- 'assert_true', 'assert_false', 'assert_raises', 'raises',
- 'with_setup' ]
+ 'assert_almost_equal', 'assert_array_almost_equal', 'assert_true',
+ 'assert_false', 'assert_raises', 'raises', 'with_setup']
+
+
+def assert_array_almost_equal(arr1, arr2, decimal=6):
+ assert_equal(len(arr1), len(arr2))
+ for i in range(len(arr1)):
+ assert_almost_equal(arr1[i], arr2[i], decimal)