Hmm. From looking at your full log (THANK YOU for posting that, btw - so many people don't), it looks like an issue with certificate checking. Might be a bug in the test itself. Does the same thing happen with a more recent Python build? It could be a weirdness with specific versions of OpenSSL.
Hmm, my Googling brought me this: https://bugs.python.org/issue30714 Apparently, the test fails with newer versions of openssl and the test was fixed in 3.7, 3.6 and 2.7, but for some reason 3.5 was removed from the versions field of this bug report. -- https://mail.python.org/mailman/listinfo/python-list