Beispiel #1
0
 def test_new_with_index(self):
     path = HubitModelPath("segments[IDX_SEG].lay1ers[:@IDX1LAY113]")
     index_specifiers = path.get_index_specifiers()
     path = path.new_with_index(index_specifiers[1], "1")
     assert path == HubitModelPath("segments[IDX_SEG].lay1ers[1]")
Beispiel #2
0
 def test_get_specifiers(self):
     """Extract idxspecs from path"""
     path = HubitModelPath("segs[:@IDX_SEG].walls[IDX_WALL].heat_flow")
     expected_idxids = [":@IDX_SEG", "IDX_WALL"]
     idxids = path.get_index_specifiers()
     self.assertSequenceEqual(expected_idxids, idxids)