Exemplo n.º 1
0
    def test_scale_offset_as_quantity_setter_pint_quantity(self):
        self.axis.scale_as_quantity = _ureg.parse_expression('2.5 nm')
        assert self.axis.scale == 2.5
        assert self.axis.units == 'nm'

        self.axis.offset_as_quantity = _ureg.parse_expression('5e-3 mm')
        assert self.axis.offset == 5e-3
        assert self.axis.units == 'mm'
Exemplo n.º 2
0
    def test_scale_offset_as_quantity_setter_pint_quantity(self):
        self.axis.scale_as_quantity = _ureg.parse_expression('2.5 nm')
        assert self.axis.scale == 2.5
        assert self.axis.units == 'nm'

        self.axis.offset_as_quantity = _ureg.parse_expression('5e-3 mm')
        assert self.axis.offset == 5e-3
        assert self.axis.units == 'mm'