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
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"
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
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