diff --git a/tests/test_auth.py b/tests/test_auth.py index ac3e3c6..0f6ef16 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -62,10 +62,12 @@ class AuthTestSpotipy(unittest.TestCase): @classmethod def setUpClass(self): - warnings.filterwarnings( - "ignore", - category=ResourceWarning, - message="unclosed.*") + if sys.version_info >= (3, 2): + # >= Python3.2 only + warnings.filterwarnings( + "ignore", + category=ResourceWarning, + message="unclosed.*") missing = list(filter(lambda var: not os.getenv(CCEV[var]), CCEV))