Exemplo n.º 1
0
def test_write_dxf(txt, ver):
    expected = basic_tags_from_text(txt)
    polyline = Polyline.from_text(txt)
    collector = TagCollector(dxfversion=ver, optional=True)
    polyline.export_dxf(collector)
    assert collector.tags == expected

    collector2 = TagCollector(dxfversion=ver, optional=False)
    polyline.export_dxf(collector2)
    assert collector.has_all_tags(collector2)
Exemplo n.º 2
0
def entity(request):
    return Polyline.from_text(request.param)
Exemplo n.º 3
0
def test_malformed_polyline():
    entity = Polyline.from_text(MALFORMED_POLYLINE)
    assert entity.dxf.layer == "LY_EZDXF"
    assert entity.dxf.linetype == "LT_EZDXF"
    assert entity.dxf.color == 7
    assert entity.dxf.elevation.isclose((0, 0, 99))