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