This feature was requested by @omaciel during PoC demo.
Entities initialization do not have any logic and do not perform any calculations, that's why we decided to init all of them inside session - to have nice shortcut and ability to call any entity's helper without the need to explicitly import them in tests.
However, since majority of tests will only use just few entities and definitely not all of them - we should probably think of lazy init.
Few ideas off the top of my head:
(preferable) Use cached_property for entities initialization.
Write our own implementation of simple cache, probably on top of regular properties
(last resort) Write custom __getattr__() which will init entity. Definitely a bad practice and rather a hack.
This feature was requested by @omaciel during PoC demo. Entities initialization do not have any logic and do not perform any calculations, that's why we decided to init all of them inside session - to have nice shortcut and ability to call any entity's helper without the need to explicitly import them in tests. However, since majority of tests will only use just few entities and definitely not all of them - we should probably think of lazy init.
Few ideas off the top of my head:
__getattr__()
which will init entity. Definitely a bad practice and rather a hack.