Exemple #1
0
def test_do_not_copy_source_block_reference():
    e = DXFEntity()
    insert = Insert()
    e.set_source_block_reference(insert)
    copy = e.copy()
    assert copy.has_source_block_reference is False
    assert copy.source_block_reference is None
Exemple #2
0
def test_setting_source_block_reference_a_second_time_has_no_effect():
    e = DXFEntity()
    insert = Insert()
    e.set_source_block_reference(insert)
    e.set_source_block_reference(Insert())
    assert (e.source_block_reference is
            insert), "source block reference should not change"
Exemple #3
0
def test_setting_source_block_reference_twice_without_exception():
    e = DXFEntity()
    e.set_source_block_reference(Insert())
    e.set_source_block_reference(Insert())
    assert True is True
Exemple #4
0
def test_set_source_block_reference():
    e = DXFEntity()
    insert = Insert()
    e.set_source_block_reference(insert)
    assert e.has_source_block_reference is True
    assert e.source_block_reference is insert