def test_dxf_export_two_attribute(entity, processor): attribs = DXFNamespace(processor, entity) tagwriter = TagCollector() attribs.export_dxf_attribs(tagwriter, ['handle', 'owner']) assert len(tagwriter.tags) == 2 assert tagwriter.tags[0] == (5, 'FFFF') assert tagwriter.tags[1] == (330, 'ABBA')
def test_dxf_export_two_attribute(entity, processor): attribs = DXFNamespace(processor, entity) tagwriter = TagCollector() attribs.export_dxf_attribs(tagwriter, ["handle", "owner"]) assert len(tagwriter.tags) == 2 assert tagwriter.tags[0] == (5, "FFFF") assert tagwriter.tags[1] == (330, "ABBA")
def test_dxf_export_one_attribute(entity, processor): attribs = DXFNamespace(processor, entity) tagwriter = TagCollector() attribs.export_dxf_attribs(tagwriter, 'handle') assert len(tagwriter.tags) == 1 assert tagwriter.tags[0] == (5, 'FFFF') with pytest.raises(DXFAttributeError): attribs.export_dxf_attribute(tagwriter, 'mozman')