Added test for layer without _id (str convertion)

This commit is contained in:
Salvador E. Tropea 2021-02-12 14:37:14 -03:00
parent 2891a3a713
commit ab8d3b4823
1 changed files with 9 additions and 0 deletions

View File

@ -308,3 +308,12 @@ def test_search_as_plugin_fail(test_dir, caplog):
GS.kicad_plugins_dirs.append(dir_fake)
fname = search_as_plugin('fake', [''])
assert fname == 'fake'
def test_layer_no_id():
with context.cover_it(cov):
la = Layer()
la.layer = 'F.Cu'
la.description = 'Top'
la.suffix = 'F_Cu'
assert str(la) == "F.Cu ('Top' F_Cu)"