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 copy_entity(self, entity: DXFEntity) -> int: """Copy a single entity and returns the id or 0 if the entity is already copied. """ if id(entity) in self._copies: return 0 self._copies[id(entity)] = entity.copy() return id(entity)