From: W. Trevor King Date: Wed, 17 Oct 2012 17:04:35 +0000 (-0400) Subject: calibration: add CalibrationSetting attribute-setting doctests. X-Git-Tag: 0.6~26 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e55be05729d360ac192762664d993e042485f4dc;p=pycomedi.git calibration: add CalibrationSetting attribute-setting doctests. --- diff --git a/pycomedi/calibration.pyx b/pycomedi/calibration.pyx index ec89ec0..7a7eb5f 100644 --- a/pycomedi/calibration.pyx +++ b/pycomedi/calibration.pyx @@ -425,6 +425,28 @@ cdef class CalibrationSetting (object): from physical coefficients: [ 0.] from physical origin: 0.0 + Test setting various attributes. + + >>> s = c.settings[-1] + >>> s.channels = [0, 1, 2] + >>> s.channels + array([0, 1, 2]) + >>> s.ranges = [0, 1] + >>> s.ranges + array([0, 1]) + >>> s.arefs = [0] + >>> s.arefs + array([0]) + >>> caldacs = [] + >>> for i in range(3): + ... caldac = Caldac() + ... caldac.allocate() + ... caldac.subdevice = i + ... caldac.channel = 2*i + ... caldac.value = 3*i + ... caldacs.append(caldac) + >>> s.caldacs = caldacs + >>> d.close() """ def __cinit__(self):