Kaydet (Commit) 938045f3 authored tarafından Bo Bayles's avatar Bo Bayles Kaydeden (comit) Stefan Krah

bpo-34179: Make sure decimal context doesn't affect other tests. (#8376)

üst 56868f94
...@@ -872,7 +872,7 @@ class CPyTimeTestCase: ...@@ -872,7 +872,7 @@ class CPyTimeTestCase:
ns_timestamps = self._rounding_values(use_float) ns_timestamps = self._rounding_values(use_float)
valid_values = convert_values(ns_timestamps) valid_values = convert_values(ns_timestamps)
for time_rnd, decimal_rnd in ROUNDING_MODES : for time_rnd, decimal_rnd in ROUNDING_MODES :
context = decimal.getcontext() with decimal.localcontext() as context:
context.rounding = decimal_rnd context.rounding = decimal_rnd
for value in valid_values: for value in valid_values:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment