Merge "test_adb.py: silence ResourceWarning."

am: f2eaefe368

Change-Id: I4918eaf2285835afd3b3f5ac6592abb3f5e714a3
This commit is contained in:
Josh Gao 2018-10-17 14:26:08 -07:00 committed by android-build-merger
commit 6887e95599

View file

@ -31,6 +31,7 @@ import sys
import threading
import time
import unittest
import warnings
@contextlib.contextmanager
@ -229,6 +230,10 @@ class ServerTest(unittest.TestCase):
stderr=subprocess.STDOUT)
try:
# We get warnings for unclosed files for the subprocess's pipes,
# and it's somewhat cumbersome to close them, so just ignore this.
warnings.simplefilter("ignore", ResourceWarning)
# Run the adb client and have it start the adb server.
proc = subprocess.Popen(["adb", "-P", str(port), "start-server"],
stdin=subprocess.PIPE,