mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	Avoid failing in test_urllibnet.test_bad_address when some overzealous
DNS service (e.g. OpenDNS) resolves a non-existent domain name. The test is now skipped instead.
This commit is contained in:
		
						commit
						88fcf1bcab
					
				
					 2 changed files with 12 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -113,6 +113,14 @@ class urlopenNetworkTests(unittest.TestCase):
 | 
			
		|||
    def test_bad_address(self):
 | 
			
		||||
        # Make sure proper exception is raised when connecting to a bogus
 | 
			
		||||
        # address.
 | 
			
		||||
        bogus_domain = "sadflkjsasf.i.nvali.d"
 | 
			
		||||
        try:
 | 
			
		||||
            socket.gethostbyname(bogus_domain)
 | 
			
		||||
        except socket.gaierror:
 | 
			
		||||
            pass
 | 
			
		||||
        else:
 | 
			
		||||
            # This happens with some overzealous DNS providers such as OpenDNS
 | 
			
		||||
            self.skipTest("%r should not resolve for test to work" % bogus_domain)
 | 
			
		||||
        self.assertRaises(IOError,
 | 
			
		||||
                          # SF patch 809915:  In Sep 2003, VeriSign started
 | 
			
		||||
                          # highjacking invalid .com and .net addresses to
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1004,6 +1004,10 @@ Extension Modules
 | 
			
		|||
Tests
 | 
			
		||||
-----
 | 
			
		||||
 | 
			
		||||
- Avoid failing in test_urllibnet.test_bad_address when some overzealous
 | 
			
		||||
  DNS service (e.g. OpenDNS) resolves a non-existent domain name.  The test
 | 
			
		||||
  is now skipped instead.
 | 
			
		||||
 | 
			
		||||
- Issue #12440: When testing whether some bits in SSLContext.options can be
 | 
			
		||||
  reset, check the version of the OpenSSL headers Python was compiled against,
 | 
			
		||||
  rather than the runtime version of the OpenSSL library.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue