summaryrefslogtreecommitdiff
path: root/tests/socket_test.py
Commit message (Collapse)AuthorAgeFilesLines
* socket: family kwarg name compatibilityissue-319Sergey Shepelev2016-05-241-0/+6
| | | | | GreenSocket was (family_or_realsock=AF_INET, ...) which breaks code like socket(family=...) https://github.com/eventlet/eventlet/issues/319
* socket: Actually provide non-blocking DNS methodsJakub Stasiak2016-05-181-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The green socket module seemed to have only blocking DNS resolution methods even with dnspython installed which is inconsistent with the documentation. This patch has a few consequences: * an import cycle is eliminated * if an import cycle reappears here it'll be visible Note: eliminating the import cycle revealed an issue related to monkey patching and the way we perform greendns tests (the test failures were already present on Python 3.5[1] as that version has some import cycle handling changes). The failures look like this: ====================================================================== FAIL: test_query_ans_types (tests.greendns_test.TestHostsResolver) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/kuba/projects/eventlet/tests/greendns_test.py", line 97, in test_query_ans_types assert isinstance(ans, greendns.dns.resolver.Answer) AssertionError ====================================================================== FAIL: test_query_unknown_no_raise (tests.greendns_test.TestHostsResolver) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/kuba/projects/eventlet/tests/greendns_test.py", line 129, in test_query_unknown_no_raise assert isinstance(ans, greendns.dns.resolver.Answer) AssertionError This issue will be addressed in a separate commit. This patch is contributed by Smarkets Limited. [1] https://github.com/eventlet/eventlet/issues/267
* greenio: socket.recv() could return str; Thanks to jerzyksocket_recv_strSergey Shepelev2015-09-061-0/+23
| | | | | It must always return bytes. https://github.com/eventlet/eventlet/issues/245
* green.socket: create_connection: UnboundLocalError on Python3gh-123-local-msgSergey Shepelev2014-09-051-0/+8
Fixes https://github.com/eventlet/eventlet/issues/123