1 import collections.abc 2 import unittest 3 from test import support 4 5 import xmlrpc.client as xmlrpclib 6 7 8 @unittest.skip('XXX: buildbot.python.org/all/xmlrpc/ is gone') 9 class PythonBuildersTest(unittest.TestCase): 10 11 def test_python_builders(self): 12 # Get the list of builders from the XMLRPC buildbot interface at 13 # python.org. 14 server = xmlrpclib.ServerProxy("http://buildbot.python.org/all/xmlrpc/") 15 try: 16 builders = server.getAllBuilders() 17 except OSError as e: 18 self.skipTest("network error: %s" % e) 19 self.addCleanup(lambda: server('close')()) 20 21 # Perform a minimal sanity check on the result, just to be sure 22 # the request means what we think it means. 23 self.assertIsInstance(builders, collections.abc.Sequence) 24 self.assertTrue([x for x in builders if "3.x" in x], builders) 25 26 27 def test_main(): 28 support.requires("network") 29 support.run_unittest(PythonBuildersTest) 30 31 if __name__ == "__main__": 32 test_main() 33