Message103972
> 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(). |
|
Date |
User |
Action |
Args |
2010-04-22 16:14:17 | giampaolo.rodola | set | recipients:
+ giampaolo.rodola, josiahcarlson, pitrou, josiah.carlson, r.david.murray, michael.foord |
2010-04-22 16:14:16 | giampaolo.rodola | set | messageid: <1271952856.91.0.300215103482.issue8490@psf.upfronthosting.co.za> |
2010-04-22 16:14:13 | giampaolo.rodola | link | issue8490 messages |
2010-04-22 16:14:12 | giampaolo.rodola | create | |
|