bpo-34179: Make sure decimal context doesn't affect other tests. (GH-8376) (#8384)
(cherry picked from commit 938045f335
)
Co-authored-by: Bo Bayles <bbayles@gmail.com>
This commit is contained in:
parent
916bcc6fde
commit
9c136700aa
|
@ -772,7 +772,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…
Reference in New Issue