Commit a4265546 authored by Brett Cannon's avatar Brett Cannon

Explicitly close a file to stop raising a ResourceWarning.

parent 087a2a95
...@@ -306,12 +306,13 @@ class TestSysConfig(unittest.TestCase): ...@@ -306,12 +306,13 @@ class TestSysConfig(unittest.TestCase):
env = os.environ.copy() env = os.environ.copy()
env['MACOSX_DEPLOYMENT_TARGET'] = '10.1' env['MACOSX_DEPLOYMENT_TARGET'] = '10.1'
with open('/dev/null') as dev_null:
p = subprocess.Popen([ p = subprocess.Popen([
sys.executable, '-c', sys.executable, '-c',
'import sysconfig; print(sysconfig.get_platform())', 'import sysconfig; print(sysconfig.get_platform())',
], ],
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=open('/dev/null'), stderr=dev_null,
env=env) env=env)
test_platform = p.communicate()[0].strip() test_platform = p.communicate()[0].strip()
test_platform = test_platform.decode('utf-8') test_platform = test_platform.decode('utf-8')
......
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