def test_write_dxf(): entity = LWPolyline.from_text(LWPOLYLINE) collector = TagCollector() entity.export_dxf(collector) assert len(collector.tags) == 0, "do not export empty polylines" entity.append((1, 2)) entity.export_dxf(collector) result = collector.tags expected = basic_tags_from_text(RESULT1) assert result == expected
def entity(): return LWPolyline.from_text(LWPOLYLINE)
def test_raises_dxf_structure_error_for_missing_AcDbPolyline_subclass(): with pytest.raises(DXFStructureError): LWPolyline.from_text(LWPOLYLINE_ERR)