Merge pull request #215 from pylast/fix-unclosed-ssl-socket-warning

Fix unclosed SSLSocket warning
This commit is contained in:
Hugo 2017-09-18 15:26:01 +03:00 committed by GitHub
commit 8baac12650
3 changed files with 6 additions and 4 deletions

View file

@ -33,8 +33,9 @@ import time
import xml.dom
__version__ = '1.9.0'
__author__ = 'Amr Hassan, hugovk'
__copyright__ = "Copyright (C) 2008-2010 Amr Hassan, 2013-2017 hugovk"
__author__ = 'Amr Hassan, hugovk, Mice Pápai'
__copyright__ = ('Copyright (C) 2008-2010 Amr Hassan, 2013-2017 hugovk, '
'2017 Mice Pápai')
__license__ = "apache2"
__email__ = 'amr.hassan@gmail.com'
@ -1048,6 +1049,7 @@ class _Request(object):
response_text = XML_ILLEGAL.sub("?", response_text)
self._check_response_for_errors(response_text)
conn.close()
return response_text
def execute(self, cacheable=False):

View file

@ -1803,7 +1803,7 @@ class TestPyLast(unittest.TestCase):
def test_set_tags(self):
# Arrange
tags = ["sometag1", "sometag2"]
artist = self.network.get_artist("Test Artist")
artist = self.network.get_artist("Test Artist 2")
artist.add_tags(tags)
tags_before = artist.get_tags()
new_tags = ["settag1", "settag2"]

View file

@ -15,7 +15,7 @@ deps =
ipdb
pytest-cov
flaky
commands = py.test -v --cov pylast --cov-report term-missing {posargs}
commands = py.test -v -s -W all --cov pylast --cov-report term-missing {posargs}
[testenv:venv]
deps = ipdb