diff options
author | Guido van Rossum <guido@python.org> | 2001-07-10 15:46:34 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-07-10 15:46:34 (GMT) |
commit | 05be1a0fd6f86654f46e5aeadf04b25a3aa406e4 (patch) | |
tree | 72eb613add443dc767e954dad9afdb03f36ad739 /Lib | |
parent | 12060e5ed375694d1f9104389344ff4bba4b9118 (diff) | |
download | cpython-05be1a0fd6f86654f46e5aeadf04b25a3aa406e4.zip cpython-05be1a0fd6f86654f46e5aeadf04b25a3aa406e4.tar.gz cpython-05be1a0fd6f86654f46e5aeadf04b25a3aa406e4.tar.bz2 |
Ported to Windows:
- Set the host to "localhost" instead of "".
- Skip the AF_UNIX tests when socket.AF_UNIX is not defined.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_socketserver.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/test/test_socketserver.py b/Lib/test/test_socketserver.py index 2d6ee2d..b2d9661 100644 --- a/Lib/test/test_socketserver.py +++ b/Lib/test/test_socketserver.py @@ -90,7 +90,7 @@ def pickport(): seed += 1 return 10000 + (os.getpid() % 1000)*10 + seed -host = "" +host = "localhost" testfiles = [] def pickaddr(proto): if proto == socket.AF_INET: @@ -147,10 +147,11 @@ else: def testall(): testloop(socket.AF_INET, tcpservers, MyStreamHandler, teststream) testloop(socket.AF_INET, udpservers, MyDatagramHandler, testdgram) - testloop(socket.AF_UNIX, streamservers, MyStreamHandler, teststream) - # Alas, on Linux (at least) recvfrom() doesn't return a meaningful - # client address so this cannot work: - ##testloop(socket.AF_UNIX, dgramservers, MyDatagramHandler, testdgram) + if hasattr(socket, 'AF_UNIX'): + testloop(socket.AF_UNIX, streamservers, MyStreamHandler, teststream) + # Alas, on Linux (at least) recvfrom() doesn't return a meaningful + # client address so this cannot work: + ##testloop(socket.AF_UNIX, dgramservers, MyDatagramHandler, testdgram) def main(): try: |