Issue #8498: In socket.accept(), allow to specify 0 as a backlog value in
order to accept exactly one connection.  Patch by Daniel Evers.
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 7ee16eb..12e09dd 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -700,6 +700,13 @@
     def test_sendall_interrupted_with_timeout(self):
         self.check_sendall_interrupted(True)
 
+    def testListenBacklog0(self):
+        srv = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+        srv.bind((HOST, 0))
+        # backlog = 0
+        srv.listen(0)
+        srv.close()
+
 
 @unittest.skipUnless(thread, 'Threading required for this test.')
 class BasicTCPTest(SocketConnectedTest):