summary refs log tree commit diff stats
path: root/lib/pure/asyncftpclient.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure/asyncftpclient.nim')
-rw-r--r--lib/pure/asyncftpclient.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/asyncftpclient.nim b/lib/pure/asyncftpclient.nim
index 96f54b49e..daf69d59f 100644
--- a/lib/pure/asyncftpclient.nim
+++ b/lib/pure/asyncftpclient.nim
@@ -300,7 +300,7 @@ proc newAsyncFtpClient*(address: string, port = Port(21),
   result.dsockConnected = false
   result.csock = newAsyncSocket()
 
-when isMainModule:
+when not defined(testing) and isMainModule:
   var ftp = newAsyncFtpClient("example.com", user = "test", pass = "test")
   proc main(ftp: AsyncFtpClient) {.async.} =
     await ftp.connect()