Skip to content

Commit ea02f0f

Browse files
Fix issue 1162 (#1167)
* Object and Face list refactoring * Object and Face list refactoring * Object and Face list refactoring * Fixed comment * Fixed Icepak unittest dependency * Private method and missing except condition * Improving Test coverage * Remove BaseList which was not used Improve read aedt file Adding exceptions to the create method * Improve coverage * Improve coverage
1 parent e1ce07d commit ea02f0f

File tree

3 files changed

+297
-26
lines changed

3 files changed

+297
-26
lines changed

_unittest/test_02_3D_modeler.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,27 @@ def test_27_create_region(self):
210210
assert self.aedtapp.modeler.create_air_region(*[20, 20, 30, 50, 50, 100])
211211
assert self.aedtapp.modeler.edit_region_dimensions([40, 30, 30, 50, 50, 100])
212212

213-
def test_28_create_face_list(self):
213+
def test_28A_create_face_list(self):
214214
fl = self.aedtapp.modeler.get_object_faces("Second_airbox")
215215
assert self.aedtapp.modeler.create_face_list(fl, "my_face_list")
216+
assert not self.aedtapp.modeler.create_face_list(fl, "my_face_list")
217+
assert self.aedtapp.modeler.create_face_list(fl)
218+
assert self.aedtapp.modeler.create_face_list([str(fl[0])])
219+
assert not self.aedtapp.modeler.create_face_list(["outer2"])
216220

217221
def test_28B_create_object_list(self):
218222
assert self.aedtapp.modeler.create_object_list(["Second_airbox"], "my_object_list")
223+
assert not self.aedtapp.modeler.create_object_list(["Second_airbox"], "my_object_list")
224+
assert self.aedtapp.modeler.create_object_list(["Core", "outer"])
225+
self.aedtapp.modeler.user_lists[4].props["List"] = ["outer", "Core", "inner"]
226+
self.aedtapp.modeler.user_lists[4].auto_update = False
227+
fl = self.aedtapp.modeler.get_object_faces("Core")
228+
self.aedtapp.modeler.user_lists[4].props["Type"] = "Face"
229+
self.aedtapp.modeler.user_lists[4].props["List"] = fl
230+
self.aedtapp.modeler.user_lists[4].update()
231+
assert self.aedtapp.modeler.user_lists[2].rename("new_list")
232+
assert self.aedtapp.modeler.user_lists[2].delete()
233+
assert not self.aedtapp.modeler.create_object_list(["Core2", "outer"])
219234

220235
def test_29_create_outer_face_list(self):
221236
assert self.aedtapp.modeler.create_outer_facelist(["Second_airbox"])

_unittest/test_98_Icepak.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,11 @@ def test_13a_assign_openings(self):
186186

187187
def test_13b_assign_grille(self):
188188
airfaces = [self.aedtapp.modeler["Region"].top_face_y.id]
189+
self.aedtapp.modeler.user_lists[0].delete()
189190
grille = self.aedtapp.assign_grille(airfaces)
190191
grille.props["Free Area Ratio"] = 0.7
191192
assert grille.update()
193+
self.aedtapp.modeler.user_lists[0].delete()
192194
airfaces = [self.aedtapp.modeler["Region"].bottom_face_x.id]
193195
grille2 = self.aedtapp.assign_grille(
194196
airfaces, free_loss_coeff=False, x_curve=["0", "3", "5"], y_curve=["0", "2", "3"]

0 commit comments

Comments
 (0)