Skip to content

HasPosition.get_units() always returns None #70

@kadykov

Description

@kadykov

To reproduce:

In the configuration yml file:

[daemon_name]
port = 39001
units = "millimeter"

In the daemon class:

class DaemonName(HasPosition, IsDaemon):
    _kind = "DaemonName"

    def __init__(self, name: str, config: Dict[str, Any], config_filepath: Path):
        super().__init__(name, config, config_filepath)
        self.logger.debug("Getting units from get.units(): %s", self.get_units())
        self.logger.debug("Getting units from the config: %s", self._config["units"])

From the client side:

import yaqc

daemon = yaqc.Client(port=39001)
daemon.get_units()

I see that get_units() is covered by tests, but I cannot check it because on my machine most of the tests fail on from yaqd_core import testing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions