aboutsummaryrefslogtreecommitdiff
path: root/test_adb.py
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2018-10-16 11:00:39 -0700
committerJosh Gao <jmgao@google.com>2018-10-16 11:00:39 -0700
commitbe29491080e546f8ca206440233db3c87b584772 (patch)
tree0f43f4106247c16a589358e24c55745015c9adf6 /test_adb.py
parentbdf47126bb7218629cae7f96e89b9f752c0d1d0a (diff)
downloadadb-be29491080e546f8ca206440233db3c87b584772.tar.gz
test_adb.py: silence ResourceWarning.
Test: ./adb_test.py Change-Id: If12558492e4edafd3568530a96eac2032526877d
Diffstat (limited to 'test_adb.py')
-rwxr-xr-xtest_adb.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test_adb.py b/test_adb.py
index 7e73818d..430fc3d8 100755
--- a/test_adb.py
+++ b/test_adb.py
@@ -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,