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 @classmethod
def setUpClass(self): def setUpClass(self):
warnings.filterwarnings( if sys.version_info >= (3, 2):
"ignore", # >= Python3.2 only
category=ResourceWarning, warnings.filterwarnings(
message="unclosed.*<ssl.SSLSocket.*>") "ignore",
category=ResourceWarning,
message="unclosed.*<ssl.SSLSocket.*>")
missing = list(filter(lambda var: not os.getenv(CCEV[var]), CCEV)) missing = list(filter(lambda var: not os.getenv(CCEV[var]), CCEV))