diff options
author | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2015-02-01 13:40:08 -0500 |
---|---|---|
committer | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2015-02-01 13:40:08 -0500 |
commit | 360eddc3c421cc193716b17d33cc94d8444d64ce (patch) | |
tree | 11ac8f0dae7d61c9581287c427cdbaf36f26b017 /gerber/tests/tests.py | |
parent | 208149d6769e608918e04977a5af110bce9c5bd6 (diff) | |
download | gerbonara-360eddc3c421cc193716b17d33cc94d8444d64ce.tar.gz gerbonara-360eddc3c421cc193716b17d33cc94d8444d64ce.tar.bz2 gerbonara-360eddc3c421cc193716b17d33cc94d8444d64ce.zip |
Added primitives and tests
Diffstat (limited to 'gerber/tests/tests.py')
-rw-r--r-- | gerber/tests/tests.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gerber/tests/tests.py b/gerber/tests/tests.py index 222eea3..e7029e4 100644 --- a/gerber/tests/tests.py +++ b/gerber/tests/tests.py @@ -15,5 +15,10 @@ from nose.tools import raises from nose import with_setup __all__ = ['assert_in', 'assert_not_in', 'assert_equal', 'assert_not_equal', - 'assert_almost_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 xrange(len(arr1)): + assert_almost_equal(arr1[i], arr2[i], decimal)
\ No newline at end of file |