summaryrefslogtreecommitdiff
path: root/pint/testsuite/test_quantity.py
diff options
context:
space:
mode:
authorFranchuFranchu <fff999abc999@gmail.com>2020-03-19 18:40:03 -0300
committerFranchuFranchu <fff999abc999@gmail.com>2020-03-21 18:16:44 -0300
commit18d2a218ba338b49467a64842367061eb53e829a (patch)
tree4c8090e0cc77ce8e9e051b682521411848716e72 /pint/testsuite/test_quantity.py
parent46f305556c17231e58c320f1b551e7061cfea6d4 (diff)
downloadpint-18d2a218ba338b49467a64842367061eb53e829a.tar.gz
Fixed bug with to_compact
Diffstat (limited to 'pint/testsuite/test_quantity.py')
-rw-r--r--pint/testsuite/test_quantity.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pint/testsuite/test_quantity.py b/pint/testsuite/test_quantity.py
index d4fa778..b58e227 100644
--- a/pint/testsuite/test_quantity.py
+++ b/pint/testsuite/test_quantity.py
@@ -608,6 +608,12 @@ class TestQuantityToCompact(QuantityTestCase):
with self.assertWarns(RuntimeWarning):
self.compareQuantity_compact(x, x)
+ def test_very_large_to_compact(self):
+ # This should not raise an IndexError
+ self.compareQuantity_compact(
+ self.Q_(10000, "yottameter"), self.Q_(10 ** 28, "meter").to_compact()
+ )
+
class TestQuantityBasicMath(QuantityTestCase):