Example #1
0
def test_copy_entity_transparency():
    line = Line()
    line2 = line.copy()
    assert line2.dxf.hasattr("transparency") is False

    line.transparency = 0.5
    line2 = line.copy()
    assert line2.dxf.transparency == 0x0200007F
Example #2
0
def test_default_init():
    entity = Line()
    assert entity.dxftype() == TEST_TYPE
Example #3
0
def test_setting_invalid_transparency_value_raises_exception():
    line = Line()
    with pytest.raises(DXFValueError):
        line.dxf.transparency = 0