Coverage for /opt/conda/envs/apienv/lib/python3.10/site-packages/daiquiri/core/hardware/bliss/test.py: 0%
12 statements
« prev ^ index » next coverage.py v7.6.5, created at 2024-11-15 02:12 +0000
« prev ^ index » next coverage.py v7.6.5, created at 2024-11-15 02:12 +0000
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3from daiquiri.core.hardware.abstract import HardwareProperty
4from daiquiri.core.hardware.abstract.test import Test as AbstractTest, TestStates
5from daiquiri.core.hardware.bliss.object import BlissObject
7import logging
9logger = logging.getLogger(__name__)
12class StateProperty(HardwareProperty):
13 def translate_from(self, value):
14 if value == 1:
15 return TestStates[0]
17 return ["UNKNOWN"]
20class Test(BlissObject, AbstractTest):
21 PROPERTY_MAP = {
22 "number": HardwareProperty("number"),
23 "string": HardwareProperty("string"),
24 "option": HardwareProperty("option"),
25 "state": StateProperty("state"),
26 "read_only": HardwareProperty("read_only"),
27 }