summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorJelle Zijlstra <jelle.zijlstra@gmail.com>2022-04-24 22:02:57 (GMT)
committerGitHub <noreply@github.com>2022-04-24 22:02:57 (GMT)
commite93d2fbddaee329b2e8f405cbb5aec44ca221de6 (patch)
treeb708d272b7cdabbc11af3ac241c86b94427e65ed /Lib/test
parentdd3cf124a033a2e3bb975be53db40213457afd51 (diff)
downloadcpython-e93d2fbddaee329b2e8f405cbb5aec44ca221de6.zip
cpython-e93d2fbddaee329b2e8f405cbb5aec44ca221de6.tar.gz
cpython-e93d2fbddaee329b2e8f405cbb5aec44ca221de6.tar.bz2
gh-91821: Make decimal test succeed consistently (#91825)
The test relies on precision being set to 9, but some ways of invoking this test leave it set to 28 instead. I don't know exactly how it happens, but setting the precision directly should make the behavior consistent.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_decimal.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py
index 96f8f7f..f7a47c8 100644
--- a/Lib/test/test_decimal.py
+++ b/Lib/test/test_decimal.py
@@ -5520,6 +5520,7 @@ class CWhitebox(unittest.TestCase):
with localcontext() as c:
+ c.prec = 9
c.traps[InvalidOperation] = True
c.traps[Overflow] = True
c.traps[Underflow] = True