예제 #1
0
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
예제 #2
0
def entity():
    return LWPolyline.from_text(LWPOLYLINE)
예제 #3
0
def test_raises_dxf_structure_error_for_missing_AcDbPolyline_subclass():
    with pytest.raises(DXFStructureError):
        LWPolyline.from_text(LWPOLYLINE_ERR)