This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author giampaolo.rodola
Recipients exarkun, flox, giampaolo.rodola, loewis, mark.dickinson, pitrou, ronaldoussoren, skrah
Date 2010-08-16.15:05:19
SpamBayes Score 2.1154478e-09
Marked as misclassified No
Message-id <1281971126.89.0.521799791649.issue8857@psf.upfronthosting.co.za>
In-reply-to
Content
I think the main problem here is that it's not easy to write reliable tests that work across all platforms (getaddrinfo(host, 'ftp') returning UDP addresses on FreeBSD/Qemu only is an example).
We might try to go a little deeper as you suggested but it's very likely that some buildbots turn red, IMHO.

> One example of this: test the 'family' flag by looking for 
> www.google.com with both AF_INET and AF_INET6 and then check that the 
> first returns IPv4 information and the second IPv6.

This is already done, although for IPv4 only and by using localhost instead of google.com.

        infos = socket.getaddrinfo(HOST, None, socket.AF_INET)
        for family, _, _, _, _ in infos:
            self.assertEqual(family, socket.AF_INET)

I'm attaching a new patch which adds some additional checks.
Feel free to extend it, if you want.
History
Date User Action Args
2010-08-16 15:05:27giampaolo.rodolasetrecipients: + giampaolo.rodola, loewis, ronaldoussoren, exarkun, mark.dickinson, pitrou, skrah, flox
2010-08-16 15:05:26giampaolo.rodolasetmessageid: <1281971126.89.0.521799791649.issue8857@psf.upfronthosting.co.za>
2010-08-16 15:05:25giampaolo.rodolalinkissue8857 messages
2010-08-16 15:05:21giampaolo.rodolacreate