8000 gh-91821: Make decimal test succeed consistently (#91825) · python/cpython@e93d2fb · GitHub
[go: up one dir, main page]

Skip to content

Commit e93d2fb

Browse files
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.
1 parent dd3cf12 commit e93d2fb

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Lib/test/test_decimal.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5520,6 +5520,7 @@ def test_from_tuple(self):
55205520

55215521
with localcontext() as c:
55225522

5523+
c.prec = 9
55235524
c.traps[InvalidOperation] = True
55245525
c.traps[Overflow] = True
55255526
c.traps[Underflow] = True
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix unstable ``test_from_tuple`` test in ``test_decimal.py``.

0 commit comments

Comments
 (0)
0