MCPcopy Create free account
hub / github.com/KLayout/klayout / test_cif_options

Method test_cif_options

testdata/python/dbReaders.py:145–173  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

143
144 # CIF Options
145 def test_cif_options(self):
146
147 opt = pya.LoadLayoutOptions()
148 lm = pya.LayerMap()
149 lm.map(pya.LayerInfo(1, 0), 2, pya.LayerInfo(42, 17))
150 opt.cif_set_layer_map(lm, True)
151
152 self.assertEqual(opt.cif_layer_map.to_string(), "1/0 : 42/17\n")
153 self.assertEqual(opt.cif_create_other_layers, True)
154
155 opt.cif_create_other_layers = False
156 self.assertEqual(opt.cif_create_other_layers, False)
157
158 opt.cif_select_all_layers()
159 self.assertEqual(opt.cif_layer_map.to_string(), "")
160 self.assertEqual(opt.cif_create_other_layers, True)
161
162 opt.cif_keep_layer_names = True
163 self.assertEqual(opt.cif_keep_layer_names, True)
164 opt.cif_keep_layer_names = False
165 self.assertEqual(opt.cif_keep_layer_names, False)
166
167 opt.cif_wire_mode = 2
168 self.assertEqual(opt.cif_wire_mode, 2)
169 opt.cif_wire_mode = 4
170 self.assertEqual(opt.cif_wire_mode, 4)
171
172 opt.cif_dbu = 0.5
173 self.assertEqual(opt.cif_dbu, 0.5)
174
175# run unit tests
176if __name__ == '__main__':

Callers

nothing calls this directly

Calls 4

LoadLayoutOptionsMethod · 0.80
LayerMapMethod · 0.80
mapMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected