mirror of
https://github.com/python/cpython.git
synced 2025-08-24 18:55:00 +00:00
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.
This commit is contained in:
parent
dd3cf124a0
commit
e93d2fbdda
2 changed files with 2 additions and 0 deletions
|
@ -5520,6 +5520,7 @@ class CWhitebox(unittest.TestCase):
|
||||||
|
|
||||||
with localcontext() as c:
|
with localcontext() as c:
|
||||||
|
|
||||||
|
c.prec = 9
|
||||||
c.traps[InvalidOperation] = True
|
c.traps[InvalidOperation] = True
|
||||||
c.traps[Overflow] = True
|
c.traps[Overflow] = True
|
||||||
c.traps[Underflow] = True
|
c.traps[Underflow] = True
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Fix unstable ``test_from_tuple`` test in ``test_decimal.py``.
|
Loading…
Add table
Add a link
Reference in a new issue