From: W. Trevor King Date: Fri, 29 Jul 2011 13:53:18 +0000 (-0400) Subject: Fix doctest config-dump output in base.py. X-Git-Tag: 0.6~43 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c241d31fc7c9b823d8e6fd31ac304135e29317e4;p=pypiezo.git Fix doctest config-dump output in base.py. --- diff --git a/pypiezo/base.py b/pypiezo/base.py index 94d8fe0..7ab0295 100644 --- a/pypiezo/base.py +++ b/pypiezo/base.py @@ -227,25 +227,27 @@ class PiezoAxis (object): >>> p.setup_config() >>> print(config['channel'].dump()) - {'channel': 0, - 'conversion-coefficients': array([ -1.00000000e+01, 3.05180438e-04]), - 'conversion-origin': 0.0, - 'device': '/dev/comedi0', - 'inverse-conversion-coefficients': array([ 0. , 3276.75]), - 'inverse-conversion-origin': -10.0, - 'maxdata': 65535L, - 'range': 0, - 'subdevice': 1} + name: + device: /dev/comedi0 + subdevice: 1 + channel: 0 + maxdata: 65535 + range: 0 + conversion-coefficients: -10.0, 0.000305180437934 + conversion-origin: 0.0 + inverse-conversion-coefficients: 0.0, 3276.75 + inverse-conversion-origin: -10.0 >>> print(config['monitor'].dump()) - {'channel': 0, - 'conversion-coefficients': array([ -1.00000000e+01, 3.05180438e-04]), - 'conversion-origin': 0.0, - 'device': '/dev/comedi0', - 'inverse-conversion-coefficients': array([ 0. , 3276.75]), - 'inverse-conversion-origin': -10.0, - 'maxdata': 65535L, - 'range': 0, - 'subdevice': 0} + name: + device: /dev/comedi0 + subdevice: 0 + channel: 0 + maxdata: 65535 + range: 0 + conversion-coefficients: -10.0, 0.000305180437934 + conversion-origin: 0.0 + inverse-conversion-coefficients: 0.0, 3276.75 + inverse-conversion-origin: -10.0 >>> convert_bits_to_meters(p.config, 0) ... # doctest: +ELLIPSIS @@ -310,15 +312,16 @@ class InputChannel(object): >>> c = InputChannel(config=channel_config, channel=channel) >>> c.setup_config() >>> print(channel_config.dump()) - {'channel': 0, - 'conversion-coefficients': array([ -1.00000000e+01, 3.05180438e-04]), - 'conversion-origin': 0.0, - 'device': '/dev/comedi0', - 'inverse-conversion-coefficients': array([ 0. , 3276.75]), - 'inverse-conversion-origin': -10.0, - 'maxdata': 65535L, - 'range': 0, - 'subdevice': 0} + name: + device: /dev/comedi0 + subdevice: 0 + channel: 0 + maxdata: 65535 + range: 0 + conversion-coefficients: -10.0, 0.000305180437934 + conversion-origin: 0.0 + inverse-conversion-coefficients: 0.0, 3276.75 + inverse-conversion-origin: -10.0 >>> convert_bits_to_volts(c.config, 0) -10.0