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