From b437377c3bc003bd02a8f1a17d0836b1da30c87d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jules=20Ch=C3=A9ron?= Date: Sat, 3 Sep 2022 18:48:29 +0200 Subject: [PATCH] Fix doctests --- pint/facets/context/registry.py | 2 +- pint/facets/plain/quantity.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pint/facets/context/registry.py b/pint/facets/context/registry.py index eb9b3b40b..95ecf1466 100644 --- a/pint/facets/context/registry.py +++ b/pint/facets/context/registry.py @@ -270,7 +270,7 @@ def context(self, *names, **kwargs) -> ContextManager[Context]: -------- Context can be called by their name: - import pint.facets.context.objects + >>> import pint.facets.context.objects >>> import pint >>> ureg = pint.UnitRegistry() >>> ureg.add_context(pint.facets.context.objects.Context('one')) diff --git a/pint/facets/plain/quantity.py b/pint/facets/plain/quantity.py index 5e4f33ddb..d4c1a55ed 100644 --- a/pint/facets/plain/quantity.py +++ b/pint/facets/plain/quantity.py @@ -618,9 +618,9 @@ def to_compact(self, unit=None) -> PlainQuantity[_MagnitudeType]: >>> import pint >>> ureg = pint.UnitRegistry() >>> (200e-9*ureg.s).to_compact() - + >>> (1e-2*ureg('kg m/s^2')).to_compact('N') - + """ if not isinstance(self.magnitude, numbers.Number):