Esempio n. 1
0
def test_default_new():
    entity = Ray.new(handle='ABBA',
                     owner='0',
                     dxfattribs={
                         'color': 7,
                         'start': (1, 2, 3),
                         'unit_vector': (4, 5, 6),
                     })
    assert entity.dxf.layer == '0'
    assert entity.dxf.color == 7
    assert entity.dxf.start == (1, 2, 3)
    assert entity.dxf.unit_vector == (4, 5, 6)
Esempio n. 2
0
def test_default_new():
    entity = Ray.new(
        handle="ABBA",
        owner="0",
        dxfattribs={
            "color": 7,
            "start": (1, 2, 3),
            "unit_vector": (4, 5, 6),
        },
    )
    assert entity.dxf.layer == "0"
    assert entity.dxf.color == 7
    assert entity.dxf.start == (1, 2, 3)
    assert entity.dxf.unit_vector == (4, 5, 6)
Esempio n. 3
0
def test_write_dxf():
    entity = Ray.from_text(RAY)
    result = TagCollector.dxftags(entity)
    expected = basic_tags_from_text(RAY)
    assert result == expected
Esempio n. 4
0
def test_default_init():
    entity = Ray()
    assert entity.dxftype() == "RAY"
    assert entity.dxf.handle is None
    assert entity.dxf.owner is None
Esempio n. 5
0
def entity():
    return Ray.from_text(RAY)