BaseCscTestCase#
- class lsst.ts.hexrotcomm.BaseCscTestCase#
Bases:
BaseCscTestCaseA variant of salobj.BaseCscTestCase that captures all but the last controller state in make_csc.
Methods Summary
check_bin_script(name, index, exe_name[, ...])Test running the CSC command line script.
make_csc([initial_state, config_dir, ...])Create a CSC and remote and wait for them to start.
Methods Documentation
- async check_bin_script(name, index, exe_name, cmdline_args=[])#
Test running the CSC command line script.
- make_csc(initial_state=State.STANDBY, config_dir=None, simulation_mode=0, log_level=None, timeout=60, **kwargs)#
Create a CSC and remote and wait for them to start.
The csc is accessed as
self.cscand the remote asself.remote.This override reads and checks all but the last
controllerStateevent during startup, in addition to thesummaryStateevent.- Parameters:
name (
str) – Name of SAL component.initial_state (
lsst.ts.salobj.Stateorint, optional) – The initial state of the CSC. Defaults to STANDBY.config_dir (
str, optional) – Directory of configuration files, orNone(the default) for the standard configuration directory (obtained fromConfigureCsc._get_default_config_dir).simulation_mode (
int, optional) – Simulation mode. Defaults to 0 because not all CSCs support simulation. However, tests of CSCs that support simulation will almost certainly want to set this nonzero.log_level (
intorNone, optional) – Logging level, such aslogging.INFO. IfNonethen do not set the log level, leaving the default behavior ofSalInfo: increase the log level to INFO.timeout (
float) – Time limit for the CSC to start (seconds).**kwargs (
dict) – Extra keyword arguments forbasic_make_csc. For a configurable CSC this may includeoverride, especially ifinitial_stateis DISABLED or ENABLED.
- Return type:
Notes
Adds a logging.StreamHandler if one is not already present.