mirror of https://github.com/KLayout/klayout.git
Add-on to previous commit: fixes some Python issues
The comments for LoadLayoutOptions#layer_map, #cif_layer_map and #dxf_layer_map have been updated to reflect the new status of these properties (which have been methods). The tests are updated accordingly (layer_map() -> layer_map).
This commit is contained in:
parent
db981b0f7d
commit
a7846ead9f
|
|
@ -115,6 +115,8 @@ gsi::ClassExt<db::LoadLayoutOptions> common_reader_options (
|
|||
"@return A reference to the layer map\n"
|
||||
"\n"
|
||||
"Starting with version 0.25 this option only applies to GDS2 and OASIS format. Other formats provide their own configuration."
|
||||
"\n"
|
||||
"Python note: this method has been turned into a property in version 0.26."
|
||||
) +
|
||||
gsi::method_ext ("create_other_layers?", &create_other_layers,
|
||||
"@brief Gets a value indicating whether other layers shall be created\n"
|
||||
|
|
|
|||
|
|
@ -129,7 +129,9 @@ gsi::ClassExt<db::LoadLayoutOptions> cif_reader_options (
|
|||
"@return A reference to the layer map\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.25 and replaces the respective global option in \\LoadLayoutOptions "
|
||||
"in a format-specific fashion."
|
||||
"in a format-specific fashion.\n"
|
||||
"\n"
|
||||
"Python note: this method has been turned into a property in version 0.26."
|
||||
) +
|
||||
gsi::method_ext ("cif_create_other_layers?", &create_other_layers,
|
||||
"@brief Gets a value indicating whether other layers shall be created\n"
|
||||
|
|
|
|||
|
|
@ -204,6 +204,8 @@ gsi::ClassExt<db::LoadLayoutOptions> dxf_reader_options (
|
|||
"\n"
|
||||
"This method has been added in version 0.25 and replaces the respective global option in \\LoadLayoutOptions "
|
||||
"in a format-specific fashion."
|
||||
"\n"
|
||||
"Python note: this method has been turned into a property in version 0.26."
|
||||
) +
|
||||
gsi::method_ext ("dxf_create_other_layers?", &create_other_layers,
|
||||
"@brief Gets a value indicating whether other layers shall be created\n"
|
||||
|
|
|
|||
|
|
@ -31,14 +31,14 @@ class DBReadersTests(unittest.TestCase):
|
|||
lm.map(pya.LayerInfo(1, 0), 2, pya.LayerInfo(42, 17))
|
||||
opt.set_layer_map(lm, True)
|
||||
|
||||
self.assertEqual(opt.layer_map().to_string(), "1/0 : 42/17\n")
|
||||
self.assertEqual(opt.layer_map.to_string(), "1/0 : 42/17\n")
|
||||
self.assertEqual(opt.create_other_layers, True)
|
||||
|
||||
opt.create_other_layers = False
|
||||
self.assertEqual(opt.create_other_layers, False)
|
||||
|
||||
opt.select_all_layers()
|
||||
self.assertEqual(opt.layer_map().to_string(), "")
|
||||
self.assertEqual(opt.layer_map.to_string(), "")
|
||||
self.assertEqual(opt.create_other_layers, True)
|
||||
|
||||
opt.text_enabled = True
|
||||
|
|
@ -88,14 +88,14 @@ class DBReadersTests(unittest.TestCase):
|
|||
lm.map(pya.LayerInfo(1, 0), 2, pya.LayerInfo(42, 17))
|
||||
opt.dxf_set_layer_map(lm, True)
|
||||
|
||||
self.assertEqual(opt.dxf_layer_map().to_string(), "1/0 : 42/17\n")
|
||||
self.assertEqual(opt.dxf_layer_map.to_string(), "1/0 : 42/17\n")
|
||||
self.assertEqual(opt.dxf_create_other_layers, True)
|
||||
|
||||
opt.dxf_create_other_layers = False
|
||||
self.assertEqual(opt.dxf_create_other_layers, False)
|
||||
|
||||
opt.dxf_select_all_layers()
|
||||
self.assertEqual(opt.dxf_layer_map().to_string(), "")
|
||||
self.assertEqual(opt.dxf_layer_map.to_string(), "")
|
||||
self.assertEqual(opt.dxf_create_other_layers, True)
|
||||
|
||||
opt.dxf_dbu = 0.5
|
||||
|
|
@ -144,14 +144,14 @@ class DBReadersTests(unittest.TestCase):
|
|||
lm.map(pya.LayerInfo(1, 0), 2, pya.LayerInfo(42, 17))
|
||||
opt.cif_set_layer_map(lm, True)
|
||||
|
||||
self.assertEqual(opt.cif_layer_map().to_string(), "1/0 : 42/17\n")
|
||||
self.assertEqual(opt.cif_layer_map.to_string(), "1/0 : 42/17\n")
|
||||
self.assertEqual(opt.cif_create_other_layers, True)
|
||||
|
||||
opt.cif_create_other_layers = False
|
||||
self.assertEqual(opt.cif_create_other_layers, False)
|
||||
|
||||
opt.cif_select_all_layers()
|
||||
self.assertEqual(opt.cif_layer_map().to_string(), "")
|
||||
self.assertEqual(opt.cif_layer_map.to_string(), "")
|
||||
self.assertEqual(opt.cif_create_other_layers, True)
|
||||
|
||||
opt.cif_keep_layer_names = True
|
||||
|
|
|
|||
Loading…
Reference in New Issue