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:
Matthias Koefferlein
2018-10-09 00:18:45 +02:00
parent db981b0f7d
commit a7846ead9f
4 changed files with 13 additions and 7 deletions
+6 -6
View File
@@ -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