Skip to content

Commit 5c4c955

Browse files
author
Andrea Mola
committed
trying to fix issue with test iges decimals possibly different from ref
1 parent e128481 commit 5c4c955

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/test_ffdcad.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ def test_ffd_iges_pipe_mod_through_files(self):
2121
cre = created.readlines()[5:]
2222
self.assertEqual(len(ref),len(cre))
2323
for i in range(len(cre)):
24-
self.assertMultiLineEqual(ref[i], cre[i])
24+
ref_ = np.asarray(ref[i].split(',')[:-1], dtype=float)
25+
cre_ = np.asarray(cre[i].split(',')[:-1], dtype=float)
26+
np.testing.assert_array_almost_equal(cre_, ref_, decimal=6)
2527
self.addCleanup(os.remove, 'test_pipe_result.iges')
2628

2729
def test_ffd_iges_pipe_mod_through_topods_shape(self):
@@ -38,5 +40,7 @@ def test_ffd_iges_pipe_mod_through_topods_shape(self):
3840
cre = created.readlines()[5:]
3941
self.assertEqual(len(ref),len(cre))
4042
for i in range(len(cre)):
41-
self.assertMultiLineEqual(ref[i], cre[i])
43+
ref_ = np.asarray(ref[i].split(',')[:-1], dtype=float)
44+
cre_ = np.asarray(cre[i].split(',')[:-1], dtype=float)
45+
np.testing.assert_array_almost_equal(cre_, ref_, decimal=6)
4246
self.addCleanup(os.remove, 'test_pipe_hollow_result.iges')

0 commit comments

Comments
 (0)