|
29 | 29 | import opengeode as geode |
30 | 30 | import opengeode_inspector_py_inspector as inspector |
31 | 31 |
|
32 | | - |
33 | 32 | def check_non_colocation2D(): |
34 | 33 | surface = geode.TriangulatedSurface2D.create() |
35 | 34 | builder = geode.TriangulatedSurfaceBuilder2D.create(surface) |
@@ -62,16 +61,17 @@ def check_colocation2D(): |
62 | 61 | colocation_inspector = inspector.SurfaceMeshColocation2D(surface) |
63 | 62 | if not colocation_inspector.mesh_has_colocated_points(): |
64 | 63 | raise ValueError( |
65 | | - "[Test] Surface doesn't have colocated points whereas it should have several.") |
66 | | - if not colocation_inspector.colocated_points_groups().nb_issues() == 2: |
| 64 | + "[Test] Surface doesn't have colocated points whereas it should have several.") |
| 65 | + issues = colocation_inspector.colocated_points_groups() |
| 66 | + if not issues.nb_issues() == 2: |
67 | 67 | raise ValueError( |
68 | 68 | "[Test] Surface has wrong number of colocated points.") |
69 | 69 | first_colocated_points_group = [0, 1, 6] |
70 | 70 | second_colocated_points_group = [3, 5] |
71 | | - if not colocation_inspector.colocated_points_groups().issues()[0] == first_colocated_points_group and not colocation_inspector.colocated_points_groups().issues()[0] == second_colocated_points_group: |
| 71 | + if not issues.issues()[0] == first_colocated_points_group and not issues.issues()[0] == second_colocated_points_group: |
72 | 72 | raise ValueError( |
73 | 73 | "[Test] Surface has wrong first colocated points group.") |
74 | | - if not colocation_inspector.colocated_points_groups().issues()[1] == first_colocated_points_group and not colocation_inspector.colocated_points_groups().issues()[1] == second_colocated_points_group: |
| 74 | + if not issues.issues()[1] == first_colocated_points_group and not issues.issues()[1] == second_colocated_points_group: |
75 | 75 | raise ValueError( |
76 | 76 | "[Test] Surface has wrong second colocated points group.") |
77 | 77 |
|
@@ -110,15 +110,16 @@ def check_colocation3D(): |
110 | 110 | if not colocation_inspector.mesh_has_colocated_points(): |
111 | 111 | raise ValueError( |
112 | 112 | "[Test] (3D) Surface doesn't have colocated points whereas it should have several.") |
113 | | - if not colocation_inspector.colocated_points_groups().nb_issues() == 2: |
| 113 | + issues = colocation_inspector.colocated_points_groups() |
| 114 | + if not issues.nb_issues() == 2: |
114 | 115 | raise ValueError( |
115 | 116 | "[Test] (3D) Surface has wrong number of colocated points.") |
116 | 117 | first_colocated_points_group = [0, 1, 6] |
117 | 118 | second_colocated_points_group = [3, 5] |
118 | | - if not colocation_inspector.colocated_points_groups().issues()[0] == first_colocated_points_group and not colocation_inspector.colocated_points_groups().issues()[0] == second_colocated_points_group: |
| 119 | + if not issues.issues()[0] == first_colocated_points_group and not issues.issues()[0] == second_colocated_points_group: |
119 | 120 | raise ValueError( |
120 | 121 | "[Test] (3D) Surface has wrong first colocated points group.") |
121 | | - if not colocation_inspector.colocated_points_groups().issues()[1] == first_colocated_points_group and not colocation_inspector.colocated_points_groups().issues()[1] == second_colocated_points_group: |
| 122 | + if not issues.issues()[1] == first_colocated_points_group and not issues.issues()[1] == second_colocated_points_group: |
122 | 123 | raise ValueError( |
123 | 124 | "[Test] (3D) Surface has wrong second colocated points group.") |
124 | 125 |
|
|
0 commit comments