From fcc5dc188eac7cacc30e1acfbb87c35cf91e5043 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Mon, 2 Aug 2021 22:02:59 +0300 Subject: [PATCH] Conditional imports from network in core tests --- src/tests/core.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tests/core.py b/src/tests/core.py index a021fbe1..fcfdc4aa 100644 --- a/src/tests/core.py +++ b/src/tests/core.py @@ -25,12 +25,15 @@ from helper_msgcoding import MsgEncode, MsgDecode from helper_sql import sqlQuery from network import asyncore_pollchoose as asyncore, knownnodes from network.bmproto import BMProto -from network.connectionpool import BMConnectionPool from network.node import Node, Peer -from network.tcp import Socks4aBMConnection, Socks5BMConnection, TCPConnection from queues import excQueue from version import softwareVersion +if state.enableNetwork: + from network.connectionpool import BMConnectionPool + from network.tcp import ( + Socks4aBMConnection, Socks5BMConnection, TCPConnection) + from common import cleanup try: