(self)
| 786 | |
| 787 | # propagation of "real" attributes through the hierarchy |
| 788 | def test_4(self): |
| 789 | |
| 790 | if not can_create_layoutview(): |
| 791 | print("Skipped test as LayoutView cannot be created.") |
| 792 | return |
| 793 | |
| 794 | cv = pya.LayoutView() |
| 795 | cv.load_layout(os.getenv("TESTSRC") + "/testdata/gds/t11.gds", True) |
| 796 | cv.load_layout(os.getenv("TESTSRC") + "/testdata/gds/t10.gds", True) |
| 797 | |
| 798 | cv.clear_layers() |
| 799 | |
| 800 | pos = cv.end_layers() |
| 801 | self.assertEqual(pos.current().is_valid(), False) |
| 802 | |
| 803 | cv.insert_layer(pos, pya.LayerProperties()) |
| 804 | |
| 805 | new_p = pya.LayerProperties() |
| 806 | new_p.source = "1/0@1" |
| 807 | pos.current().add_child(new_p) |
| 808 | |
| 809 | self.assertEqual(pos.current().visible_(True), True) |
| 810 | self.assertEqual(pos.current().visible_(False), True) |
| 811 | self.assertEqual(pos.first_child().current().visible_(True), True) |
| 812 | self.assertEqual(pos.first_child().current().visible_(False), True) |
| 813 | pos.current().visible = False |
| 814 | self.assertEqual(pos.current().visible_(True), False) |
| 815 | self.assertEqual(pos.current().visible_(False), False) |
| 816 | self.assertEqual(pos.first_child().current().visible_(True), False) |
| 817 | self.assertEqual(pos.first_child().current().visible_(False), True) |
| 818 | |
| 819 | cv._destroy() |
| 820 | |
| 821 | # delete method of iterator |
| 822 | def test_5(self): |
nothing calls this directly
no test coverage detected