(self)
| 950 | |
| 951 | # under construction and update |
| 952 | def test_9(self): |
| 953 | |
| 954 | ly = pya.Layout() |
| 955 | l1 = ly.insert_layer(pya.LayerInfo(1, 0)) |
| 956 | c1 = ly.create_cell("a") |
| 957 | self.assertEqual(ly.under_construction(), False) |
| 958 | |
| 959 | s1 = c1.shapes(l1).insert(pya.Box(0, 500, 1000, 2000)) |
| 960 | self.assertEqual(c1.bbox().to_s(), "(0,500;1000,2000)") |
| 961 | |
| 962 | ly = pya.Layout() |
| 963 | ly.start_changes() |
| 964 | self.assertEqual(ly.under_construction(), True) |
| 965 | ly.start_changes() |
| 966 | self.assertEqual(ly.under_construction(), True) |
| 967 | l1 = ly.insert_layer(pya.LayerInfo(1, 0)) |
| 968 | c1 = ly.create_cell("a") |
| 969 | s1 = c1.shapes(l1).insert(pya.Box(0, 500, 1000, 2000)) |
| 970 | self.assertEqual(c1.bbox().to_s(), "()") |
| 971 | # while under_construction, an explicit update is required to update the cell's bbox |
| 972 | ly.update() |
| 973 | self.assertEqual(c1.bbox().to_s(), "(0,500;1000,2000)") |
| 974 | ly.end_changes() |
| 975 | self.assertEqual(ly.under_construction(), True) |
| 976 | ly.end_changes() |
| 977 | self.assertEqual(ly.under_construction(), False) |
| 978 | |
| 979 | # Instance editing |
| 980 | def test_10(self): |
nothing calls this directly
no test coverage detected