homepage

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 giampaolo.rodola, josiah.carlson, josiahcarlson, michael.foord, pitrou, r.david.murray
Date 2010年04月22日.16:14:10
SpamBayes Score 1.254552e-14
Marked as misclassified No
Message-id <1271952856.91.0.300215103482.issue8490@psf.upfronthosting.co.za>
In-reply-to
Content
> should be 'listens'
[...]
> should be 'bound'
done
> I'd prefer to see a 'BaseTestAPI' that has no base class, and two 
> TestCase subclasses that use BaseTestAPI as a mixin, one for 
> use_poll=True and one for use_poll=False.
done
> - you don't use use_poll in loop_waiting_for_flag()
whoops! thanks
> - calling time.sleep() in loop_waiting_for_flag() looks wrong to me
time.sleep() in that loop grants that the condition is retried for at least 1 second before failing the test. By removing time.sleep() a test which is supposed to fail will fail almost immediately.
> - test_handle_error should check that the exception state is the 
> expected one (ZeroDivisionError), if at all possible
Good advice, done.
> - in test_set_reuse_addr, if SO_REUSEADDR fails I would suggest skipping the test with self.skip(...),
done
> in test_set_reuse_addr, sock.close() rather than sock.close
whoops =)
> does asyncore support IPv6? test_create_socket checks only AF_INET
I don't think it would worth it. create_socket() is just a thin wrapper around socket.socket(). Actually I wasn't even sure to add that test or not.
> - do you plan to also test UDP? :)
Unfortunately asyncore does not support UDP.
At a first look it would seems so, since create_socket() accepts two parameters, family and *type*:
 def create_socket(self, family, type):
 sock = socket.socket(family, type)
...but actually we can only use SOCK_STREAM, as the API just takes care of wrapping send() and recv() calls, not recvfrom() and sendto().
History
Date User Action Args
2010年04月22日 16:14:17giampaolo.rodolasetrecipients: + giampaolo.rodola, josiahcarlson, pitrou, josiah.carlson, r.david.murray, michael.foord
2010年04月22日 16:14:16giampaolo.rodolasetmessageid: <1271952856.91.0.300215103482.issue8490@psf.upfronthosting.co.za>
2010年04月22日 16:14:13giampaolo.rodolalinkissue8490 messages
2010年04月22日 16:14:12giampaolo.rodolacreate

AltStyle によって変換されたページ (->オリジナル) /