RemoteGroupTestCase¶
- class lsst.ts.observatory.control.RemoteGroupTestCase¶
Bases:
object
Base class for testing groups of CSCs.
Subclasses must:
Inherit both from this and
asynctest.TestCase
.Override
basic_make_group
to make the script and any other controllers, remotes and such, and return a list of scripts, controllers and remotes that you made.
A typical test will look like this:
- async def test_something(self):
- async with make_group():
# … test something
Methods Summary
basic_make_group
([usage])Make a group as self.group.
close
()Optional cleanup before closing.
make_group
([timeout, usage, verbose])Create a Group.
run
([result])Override
run
to set a random LSST_DDS_PARTITION_PREFIX and set LSST_SITE=test for every test.wait_for
(coro, timeout, description, verbose)A wrapper around asyncio.wait_for that prints timing information.
Methods Documentation
- abstract async basic_make_group(usage: Optional[int] = None) None ¶
Make a group as self.group.
Make all other controllers and remotes, as well and return a list of the items made.
- Returns:
- items
List
[any
] Controllers, Remotes and Group, or any other items for which to initially wait for
item.start_task
and finally wait foritem.close()
.
- items
Notes
This is a coroutine in the unlikely case that you might want to wait for something.
- make_group(timeout: float = 30, usage: Optional[int] = None, verbose: bool = False) AsyncGenerator ¶
Create a Group.
The group is accessed as
self.group
.
- run(result: Any = None) None ¶
Override
run
to set a random LSST_DDS_PARTITION_PREFIX and set LSST_SITE=test for every test.