tests.structure.test_base

tests.structure.test_base#

Unit tests for structure.base module.

Functions

test_base_obj_attributes()

Ensure we can assign attributes to an instance of BaseObject using the dot access.

test_base_obj_creation()

Ensure we can create base objects with no attributes.

test_base_obj_del_attr()

Ensure we can delete attributes of base objects.

test_base_obj_del_item()

Ensure we can delete items from base objects.

test_base_obj_getitem_protected()

Ensure access to the masked attributes is forwarded to getattr.

test_base_obj_init_attributes()

Ensure attributes passed to the instantiation are retained.

test_base_obj_init_attributes_wrong()

Ensure the correct error is raised when handing invalid objects to the attributes during instantiation.

test_base_obj_init_universes_deduplicate()

Ensure universes passed to the instantiator are deduplicated.

test_base_obj_init_universes_generator()

Ensure we can instantiate a BaseObject with universes given as a genexpr.

test_base_obj_init_universes_list()

Ensure we can instantiate a BaseObject with universes given as a list.

test_base_obj_init_universes_set()

Ensure we can instantiate a BaseObject with universes given as a set.

test_base_obj_init_universes_tuple()

Ensure we can instantiate a BaseObject with universes given as a tuple.

test_base_obj_item_attr_interop()

Ensure attributes can be set and retrieved from both dot and getitem approaches.

test_base_obj_items()

Ensure we can assign attributes to an instance of BaseObject using the item access method.

test_base_obj_universes()

Ensure the universes attribute is not exposed.