mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
bpo-34179: Make sure decimal context doesn't affect other tests. (#8376)
This commit is contained in:
parent
56868f940e
commit
938045f335
1 changed files with 12 additions and 12 deletions
|
@ -872,7 +872,7 @@ class CPyTimeTestCase:
|
|||
ns_timestamps = self._rounding_values(use_float)
|
||||
valid_values = convert_values(ns_timestamps)
|
||||
for time_rnd, decimal_rnd in ROUNDING_MODES :
|
||||
context = decimal.getcontext()
|
||||
with decimal.localcontext() as context:
|
||||
context.rounding = decimal_rnd
|
||||
|
||||
for value in valid_values:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue