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

Method test_common_options

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

Source from the content-addressed store, hash-verified

25
26 # Common Options
27 def test_common_options(self):
28
29 opt = pya.LoadLayoutOptions()
30 lm = pya.LayerMap()
31 lm.map(pya.LayerInfo(1, 0), 2, pya.LayerInfo(42, 17))
32 opt.set_layer_map(lm, True)
33
34 self.assertEqual(opt.layer_map.to_string(), "1/0 : 42/17\n")
35 self.assertEqual(opt.create_other_layers, True)
36
37 opt.create_other_layers = False
38 self.assertEqual(opt.create_other_layers, False)
39
40 opt.select_all_layers()
41 self.assertEqual(opt.layer_map.to_string(), "")
42 self.assertEqual(opt.create_other_layers, True)
43
44 opt.text_enabled = True
45 self.assertEqual(opt.text_enabled, True)
46 opt.text_enabled = False
47 self.assertEqual(opt.text_enabled, False)
48
49 opt.properties_enabled = True
50 self.assertEqual(opt.properties_enabled, True)
51 opt.properties_enabled = False
52 self.assertEqual(opt.properties_enabled, False)
53
54 # GDS2 Options
55 def test_gds2_options(self):

Callers

nothing calls this directly

Calls 6

LoadLayoutOptionsMethod · 0.80
LayerMapMethod · 0.80
select_all_layersMethod · 0.80
mapMethod · 0.45
set_layer_mapMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected