summaryrefslogtreecommitdiff
path: root/pint/testsuite/test_quantity.py
diff options
context:
space:
mode:
authorLewis A. Marshall <lewis@purigenbio.com>2020-10-31 11:11:17 -0700
committerLewis A. Marshall <lewis@purigenbio.com>2020-10-31 11:11:17 -0700
commit8a93b6f0a58868a72b666359976c45f29e6cc809 (patch)
treec6118003f6c2c9f0e115e1e80234816d406e0c85 /pint/testsuite/test_quantity.py
parent79dc97e652d67f4a9eae4b8be6590374a32edd17 (diff)
downloadpint-8a93b6f0a58868a72b666359976c45f29e6cc809.tar.gz
Formatting and changelog.
Diffstat (limited to 'pint/testsuite/test_quantity.py')
-rw-r--r--pint/testsuite/test_quantity.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/pint/testsuite/test_quantity.py b/pint/testsuite/test_quantity.py
index fe86801..c3e455c 100644
--- a/pint/testsuite/test_quantity.py
+++ b/pint/testsuite/test_quantity.py
@@ -6,7 +6,13 @@ import pickle
import warnings
from unittest.mock import patch
-from pint import DimensionalityError, OffsetUnitCalculusError, UnitRegistry, Quantity, get_application_registry
+from pint import (
+ DimensionalityError,
+ OffsetUnitCalculusError,
+ Quantity,
+ UnitRegistry,
+ get_application_registry,
+)
from pint.compat import np
from pint.testsuite import QuantityTestCase, helpers
from pint.testsuite.parameterized import ParameterizedTestCase
@@ -63,8 +69,10 @@ class TestQuantity(QuantityTestCase):
y = self.Q_(4.2, "meter")
z = self.Q_(5, "meter")
j = self.Q_(5, "meter*meter")
- k = 5 * get_application_registry().meter # Include a comparison to the application registry
- l = Quantity(5, "meter") # Include a comparison to a directly created Quantity
+
+ # Include a comparison to the application registry
+ k = 5 * get_application_registry().meter
+ l = Quantity(5, "meter") # Include a comparison to a directly created Quantity
# identity for single object
self.assertTrue(x == x)
@@ -84,9 +92,9 @@ class TestQuantity(QuantityTestCase):
self.assertTrue(x < z)
# Compare with items to the separate application registry
- self.assertTrue(k >= l) # These should both be from application registry
+ self.assertTrue(k >= l) # These should both be from application registry
with self.assertRaises(ValueError):
- z>l # One from local registry, one from application registry
+ z > l # One from local registry, one from application registry
self.assertTrue(z != j)