Kaydet (Commit) 676db4bb authored tarafından Serhiy Storchaka's avatar Serhiy Storchaka Kaydeden (comit) GitHub

bpo-31792: Restore os.environ in test_buffer when import numpy. (#4007)

üst 1295e11d
......@@ -17,7 +17,7 @@ from test import support
from itertools import permutations, product
from random import randrange, sample, choice
import warnings
import sys, array, io
import sys, array, io, os
from decimal import Decimal
from fractions import Fraction
......@@ -37,7 +37,8 @@ except ImportError:
ctypes = None
try:
with warnings.catch_warnings():
with support.EnvironmentVarGuard() as os.environ, \
warnings.catch_warnings():
from numpy import ndarray as numpy_array
except ImportError:
numpy_array = None
......
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