Merge "test_adb.py: silence ResourceWarning."
This commit is contained in:
commit
f2eaefe368
1 changed files with 5 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ import sys
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
import unittest
|
import unittest
|
||||||
|
import warnings
|
||||||
|
|
||||||
|
|
||||||
@contextlib.contextmanager
|
@contextlib.contextmanager
|
||||||
|
|
@ -229,6 +230,10 @@ class ServerTest(unittest.TestCase):
|
||||||
stderr=subprocess.STDOUT)
|
stderr=subprocess.STDOUT)
|
||||||
|
|
||||||
try:
|
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.
|
# Run the adb client and have it start the adb server.
|
||||||
proc = subprocess.Popen(["adb", "-P", str(port), "start-server"],
|
proc = subprocess.Popen(["adb", "-P", str(port), "start-server"],
|
||||||
stdin=subprocess.PIPE,
|
stdin=subprocess.PIPE,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue