Doctest changes

This commit is contained in:
Hernan Grecco 2016-02-14 02:28:17 -03:00
parent aa0ca3180e
commit 1c6897489d
3 changed files with 7 additions and 4 deletions

View File

@ -16,10 +16,12 @@ or using easy_install_::
That's all! You can check that Pint is correctly installed by starting up python, and importing pint:
.. testcode::
>>> import pint
>>> pint.__version__
>>> import pint # doctest: +SKIP
>>> pint.__version__ # doctest: +SKIP
.. testoutput::
|version|
.. note:: If you have an old system installation of Python and you don't want to

View File

@ -120,10 +120,11 @@ to be explicitly created:
.. doctest::
>>> ureg = UnitRegistry()
>>> home = 25.4 * ureg.degC
Traceback (most recent call last):
...
pint.unit.OffsetUnitCalculusError: Ambiguous operation with offset unit (degC).
pint.errors.OffsetUnitCalculusError: Ambiguous operation with offset unit (degC).
>>> Q_(25.4, ureg.degC)
<Quantity(25.4, 'degC')>

View File

@ -103,7 +103,7 @@ What is the pressure loss `p` in a pipe with length `L` and diameter `D` for a f
... 'd': '[mass]/[volume]',
... 'm': '[viscosity]',
... 'v': '[speed]'
... })
... }) # doctest: +SKIP
[{'p': 1.0, 'm': -2.0, 'd': 1.0, 'L': 2.0}, {'v': 1.0, 'm': -1.0, 'd': 1.0, 'L': 1.0}, {'L': -1.0, 'D': 1.0}]
The second dimensionless quantity is the `Reynolds Number`_