ignore ResourceWarnings in acme tests

This commit is contained in:
Erica Portnoy
2018-11-01 17:17:19 -07:00
parent 36e8d748a1
commit 6e7d42f298
3 changed files with 10 additions and 0 deletions
+4
View File
@@ -10,11 +10,15 @@ from six.moves import socketserver #type: ignore # pylint: disable=import-erro
import josepy as jose
import OpenSSL
import pytest
from acme import errors
from acme import test_util
from acme.magic_typing import List # pylint: disable=unused-import, no-name-in-module
# turns all warnings into errors for this module
pytestmark = pytest.mark.filterwarnings("ignore::ResourceWarning")
class SSLSocketAndProbeSNITest(unittest.TestCase):
"""Tests for acme.crypto_util.SSLSocket/probe_sni."""
+2
View File
@@ -3,6 +3,7 @@ import unittest
import josepy as jose
import mock
import pytest
from acme import challenges
from acme import test_util
@@ -166,6 +167,7 @@ class DirectoryTest(unittest.TestCase):
from acme.messages import Directory
Directory.from_json({'foo': 'bar'})
@pytest.mark.filterwarnings("ignore::ResourceWarning")
def test_iter_meta(self):
result = False
for k in self.dir.meta:
+4
View File
@@ -12,6 +12,7 @@ from six.moves import socketserver # type: ignore # pylint: disable=import-err
import josepy as jose
import mock
import pytest
import requests
from acme import challenges
@@ -19,6 +20,9 @@ from acme import crypto_util
from acme import test_util
from acme.magic_typing import Set # pylint: disable=unused-import, no-name-in-module
# turns all warnings into errors for this module
pytestmark = pytest.mark.filterwarnings("ignore::ResourceWarning")
class TLSServerTest(unittest.TestCase):
"""Tests for acme.standalone.TLSServer."""