2011-02-22 20:46:28 -04:00
|
|
|
import collections.abc
|
2007-08-14 13:47:39 -03:00
|
|
|
import unittest
|
2008-05-20 18:35:26 -03:00
|
|
|
from test import support
|
2007-08-14 13:47:39 -03:00
|
|
|
|
2008-05-26 13:32:26 -03:00
|
|
|
import xmlrpc.client as xmlrpclib
|
2007-08-14 13:47:39 -03:00
|
|
|
|
2017-10-08 03:31:23 -03:00
|
|
|
|
2021-09-19 09:27:33 -03:00
|
|
|
support.requires("network")
|
|
|
|
|
|
|
|
|
2017-10-08 03:31:23 -03:00
|
|
|
@unittest.skip('XXX: buildbot.python.org/all/xmlrpc/ is gone')
|
2013-10-11 13:09:51 -03:00
|
|
|
class PythonBuildersTest(unittest.TestCase):
|
2007-08-14 13:47:39 -03:00
|
|
|
|
2009-11-03 13:13:59 -04:00
|
|
|
def test_python_builders(self):
|
|
|
|
# Get the list of builders from the XMLRPC buildbot interface at
|
|
|
|
# python.org.
|
2012-06-24 15:06:54 -03:00
|
|
|
server = xmlrpclib.ServerProxy("http://buildbot.python.org/all/xmlrpc/")
|
2009-11-03 13:13:59 -04:00
|
|
|
try:
|
|
|
|
builders = server.getAllBuilders()
|
2012-12-18 17:10:48 -04:00
|
|
|
except OSError as e:
|
2009-11-03 13:13:59 -04:00
|
|
|
self.skipTest("network error: %s" % e)
|
2011-11-28 16:14:46 -04:00
|
|
|
self.addCleanup(lambda: server('close')())
|
2009-11-03 13:13:59 -04:00
|
|
|
|
|
|
|
# Perform a minimal sanity check on the result, just to be sure
|
|
|
|
# the request means what we think it means.
|
2011-02-22 20:46:28 -04:00
|
|
|
self.assertIsInstance(builders, collections.abc.Sequence)
|
2010-07-05 19:11:16 -03:00
|
|
|
self.assertTrue([x for x in builders if "3.x" in x], builders)
|
2009-11-03 13:13:59 -04:00
|
|
|
|
2007-08-14 13:47:39 -03:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2021-09-19 09:27:33 -03:00
|
|
|
unittest.main()
|