From dc3366ba5072d68fcc105c5339097ba6d967b439 Mon Sep 17 00:00:00 2001 From: felicio93 Date: Thu, 15 Aug 2024 14:18:36 -0400 Subject: [PATCH] 07 - functions and tests added - passed pylint, functional, failed (pip) --- ocsmesh/utils.py | 2 ++ tests/api/utils.py | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ocsmesh/utils.py b/ocsmesh/utils.py index c44292c..a85e100 100644 --- a/ocsmesh/utils.py +++ b/ocsmesh/utils.py @@ -3359,6 +3359,7 @@ def cleanup_skewed_el(mesh: jigsaw_msh_t, return mesh_clean + def cleanup_concave_quads(mesh: jigsaw_msh_t) -> jigsaw_msh_t: ''' Removes concave quads that might have been wrongly created @@ -3564,6 +3565,7 @@ def quadrangulate_rivermapper_arcs(arcs_shp, return quad_mesh + def batched(iterable, n): ''' This function is part of itertools for python 3.12+ diff --git a/tests/api/utils.py b/tests/api/utils.py index b47e270..3211a7f 100644 --- a/tests/api/utils.py +++ b/tests/api/utils.py @@ -84,7 +84,6 @@ def test_cleanup_skewed_el(self): [5, 6, 8, 7], [5, 0, 3, 6]])) ) - print("passed_test_cleanup_skewed_el") def test_clip_elements_by_index(self): out_msht = utils.msht_from_numpy( @@ -100,7 +99,6 @@ def test_clip_elements_by_index(self): np.all(clean_idx.quad4['index'] == np.array([[0, 2, 1, 5], [0, 5, 3, 4]])) ) - print("passed test_clip_elements_by_index") def test_clean_concv(self): out_msht = utils.msht_from_numpy( @@ -109,8 +107,7 @@ def test_clean_concv(self): quadrilaterals=self.in_quad ) clean_concv = utils.cleanup_concave_quads(out_msht) - print("THis is clean_concv: ", clean_concv.quad4['index']) - # self.assertIsInstance(clean_concv, jigsaw_msh_t) + self.assertIsInstance(clean_concv, jigsaw_msh_t) self.assertTrue( np.all(clean_concv.quad4['index'] == np.array([[6, 7, 9, 8], [6, 0, 4, 7],