def test_display_set(): mock = HcsMock() hcs = HcsCom(port=mock) volt = 12 hcs.set_voltage(volt) assert mock.display_values[0] == volt curr = 5 hcs.set_current(curr) assert mock.display_values[1] == curr
def test_display_set_format_four_digits(): mock = HcsMock() mock.set_format(FORMAT_FOUR_DIGITS) hcs = HcsCom(port=mock) assert hcs.value_format == FORMAT_FOUR_DIGITS volt = 12 hcs.set_voltage(volt) assert mock.display_values[0] == volt curr = 5 hcs.set_current(curr) assert mock.display_values[1] == curr