Skip to content

Commit c9dd073

Browse files
committed
Set the local context to ExtendedContext for two doctests which
require the ``InvalidOperation`` trap to be ``False``.
1 parent 3410cc1 commit c9dd073

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/_pydecimal.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,10 +1796,10 @@ def __round__(self, n=None):
17961796
Decimal('123.46')
17971797
>>> round(Decimal('123.456'), -2)
17981798
Decimal('1E+2')
1799-
>>> setcontext(ExtendedContext)
1800-
>>> round(Decimal('-Infinity'), 37)
1799+
>>> with localcontext(ExtendedContext):
1800+
... round(Decimal('-Infinity'), 37)
1801+
... round(Decimal('sNaN123'), 0)
18011802
Decimal('NaN')
1802-
>>> round(Decimal('sNaN123'), 0)
18031803
Decimal('NaN123')
18041804
18051805
"""

0 commit comments

Comments
 (0)