No warning in python2

This commit is contained in:
Stephane Bruckert 2020-01-16 23:30:40 +00:00
parent 3d22cf29ce
commit 7fb97ed00e

View File

@ -62,10 +62,12 @@ class AuthTestSpotipy(unittest.TestCase):
@classmethod
def setUpClass(self):
warnings.filterwarnings(
"ignore",
category=ResourceWarning,
message="unclosed.*<ssl.SSLSocket.*>")
if sys.version_info >= (3, 2):
# >= Python3.2 only
warnings.filterwarnings(
"ignore",
category=ResourceWarning,
message="unclosed.*<ssl.SSLSocket.*>")
missing = list(filter(lambda var: not os.getenv(CCEV[var]), CCEV))