summary refs log tree commit diff stats
path: root/lib/pure/asyncio.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure/asyncio.nim')
-rw-r--r--lib/pure/asyncio.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pure/asyncio.nim b/lib/pure/asyncio.nim
index f58bb4302..5fd45b215 100644
--- a/lib/pure/asyncio.nim
+++ b/lib/pure/asyncio.nim
@@ -188,8 +188,8 @@ proc asyncSocket*(domain: Domain = AF_INET, typ: SockType = SOCK_STREAM,
   result.socket.setBlocking(false)
 
 proc toAsyncSocket*(sock: Socket, state: SocketStatus = SockConnected): AsyncSocket =
-  ## Wraps an already initialized ``TSocket`` into a AsyncSocket.
-  ## This is useful if you want to use an already connected TSocket as an
+  ## Wraps an already initialized ``Socket`` into a AsyncSocket.
+  ## This is useful if you want to use an already connected Socket as an
   ## asynchronous AsyncSocket in asyncio's event loop.
   ##
   ## ``state`` may be overriden, i.e. if ``sock`` is not connected it should be
@@ -660,7 +660,7 @@ proc len*(disp: Dispatcher): int =
   ## Retrieves the amount of delegates in ``disp``.
   return disp.delegates.len
 
-when isMainModule:
+when not defined(testing) and isMainModule:
 
   proc testConnect(s: AsyncSocket, no: int) =
     echo("Connected! " & $no)