diff options
author | Josh Gao <jmgao@google.com> | 2018-10-16 11:00:39 -0700 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2018-10-16 11:00:39 -0700 |
commit | be29491080e546f8ca206440233db3c87b584772 (patch) | |
tree | 0f43f4106247c16a589358e24c55745015c9adf6 /test_adb.py | |
parent | bdf47126bb7218629cae7f96e89b9f752c0d1d0a (diff) | |
download | adb-be29491080e546f8ca206440233db3c87b584772.tar.gz |
test_adb.py: silence ResourceWarning.
Test: ./adb_test.py
Change-Id: If12558492e4edafd3568530a96eac2032526877d
Diffstat (limited to 'test_adb.py')
-rwxr-xr-x | test_adb.py | 5 |
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, |