Skip to content

Commit

Permalink
Merge pull request #1 from simphony/silence-warning
Browse files Browse the repository at this point in the history
Silence warning for resource leak
  • Loading branch information
stefanoborini authored Jun 23, 2016
2 parents 6b10b3d + 19930ac commit 6be68e4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/docker/test_async_docker_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import warnings
from tornado.testing import AsyncTestCase, gen_test

from remoteappmanager.docker.async_docker_client import AsyncDockerClient
Expand All @@ -7,6 +8,22 @@


class TestAsyncDockerClient(AsyncTestCase):
def setUp(self):
super().setUp()
# Due to a python requests design choice, we receive a warning about
# leaking connection. This is expected and pretty much out of our
# authority but it can be annoying in tests, hence we suppress the
# warning. See issue simphony-remote/10
warnings.filterwarnings(action="ignore",
message="unclosed",
category=ResourceWarning)

def tearDown(self):
super().tearDown()
warnings.filterwarnings(action="default",
message="unclosed",
category=ResourceWarning)

@gen_test
def test_info(self):
client = AsyncDockerClient()
Expand Down

0 comments on commit 6be68e4

Please sign in to comment.