ska_pst.testutils.common
Module that includes common code for SKA PST Python code.
- ska_pst.testutils.common.convert_value_to_quantity(value: str) Union[str, astropy.units.Quantity, Tuple[astropy.units.Quantity, astropy.units.Quantity]] [source]
Convert a value string to a quantity.
This tries to use the astropy.units package to see if it can convert it to a quantity. If the value starts with a number then it is expected to be a quantity (value with optional unit). If it isn’t a number the string value is returned.
This is method should be extended to handled the edge cases that may arise in the future.