From e55be05729d360ac192762664d993e042485f4dc Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 17 Oct 2012 13:04:35 -0400 Subject: [PATCH] calibration: add CalibrationSetting attribute-setting doctests. --- pycomedi/calibration.pyx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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): -- 2.26.2