class_docstr: Tests for the `Registry` class. The `Registry` should basically act as a `Container[Trial]`,
  and so the tests should be roughly the same as if they were testing the built-in `dict` class.
class_docstr_tok: ["Tests","for","the","`","Registry","`","class",".","The","`","Registry","`","should","basically","act","as","a","`","Container","[","Trial","]","`",",","and","so","the","tests","should","be","roughly","the","same","as","if","they","were","testing","the","built-in","`","dict","`","class","."]
docstr: Tests that appending a trial to a registry works as expected.
docstr_tok: ["Tests","that","appending","a","trial","to","a","registry","works","as","expected","."]
code: def test_register(self, space: Space):
      """Tests that appending a trial to a registry works as expected."""
      registry = Registry()
      trial = space.sample(1)[0]
      registered_id = registry.register(trial)
      assert len(registry) == 1
      assert list(registry) == [trial]
  
      assert registry[registered_id] == trial
  
imports: import copy
  import pytest
  from orion.algo.base.registry import Registry, RegistryMapping
  from orion.algo.space import Space
  from orion.core.io.space_builder import SpaceBuilder
  from orion.core.worker.transformer import TransformedSpace, build_required_space
  from orion.core.worker.trial import Trial
label_desc: Use image node_id 2 for calling the TestRegistry obj's underlying member method code with example usage: obj.test_register(space) without return types