From 7b32c412d5311a2cbd0c2e3d12d93abff5a4211f Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Wed, 11 Oct 2023 12:58:51 +0000 Subject: [PATCH] pylint (test suite) - imports --- scripts/create-token.py | 2 +- scripts/tx-v2-to-v3.py | 19 ++++++++++--------- test/gentest.py | 4 +--- test/hashfunc.py | 4 ++-- test/include/pexpect.py | 2 +- test/misc/tool_api_test.py | 2 +- test/objattrtest.py | 3 +-- test/objattrtest_py_d/oat_common.py | 6 +++--- test/objtest.py | 2 +- test/objtest_py_d/ot_btc_mainnet.py | 10 +++++----- test/objtest_py_d/ot_btc_testnet.py | 8 ++++---- test/objtest_py_d/ot_ltc_mainnet.py | 8 ++++---- test/objtest_py_d/ot_ltc_testnet.py | 8 ++++---- test/overlay/fakemods/mmgen/tw/view.py | 3 ++- test/scrambletest.py | 7 +++---- test/test_py_d/input.py | 2 +- test/test_py_d/ts_autosign.py | 5 ++--- test/test_py_d/ts_cfgfile.py | 6 +++--- test/test_py_d/ts_chainsplit.py | 2 -- test/test_py_d/ts_ethdev.py | 3 +-- test/test_py_d/ts_input.py | 11 +++++------ test/test_py_d/ts_opts.py | 2 +- test/test_py_d/ts_ref.py | 1 - test/test_py_d/ts_ref_altcoin.py | 2 -- test/test_py_d/ts_regtest.py | 2 +- test/test_py_d/ts_shared.py | 4 +--- test/test_py_d/ts_xmrwallet.py | 2 +- test/tooltest.py | 6 +++--- test/tooltest2.py | 2 +- test/unit_tests_d/ut_daemon.py | 3 +-- test/unit_tests_d/ut_msg.py | 3 ++- test/unit_tests_d/ut_scrypt.py | 3 ++- test/unit_tests_d/ut_tx_deserialize.py | 1 - test/unit_tests_d/ut_util.py | 5 +++-- 34 files changed, 71 insertions(+), 82 deletions(-) diff --git a/scripts/create-token.py b/scripts/create-token.py index 7b52fa43..a83369da 100755 --- a/scripts/create-token.py +++ b/scripts/create-token.py @@ -20,7 +20,7 @@ scripts/create-token.py: Automated ERC20 token creation for the MMGen suite """ -import sys,os,json,re +import sys,json,re from subprocess import run,PIPE from collections import namedtuple diff --git a/scripts/tx-v2-to-v3.py b/scripts/tx-v2-to-v3.py index 581cd7d3..3c849cbb 100755 --- a/scripts/tx-v2-to-v3.py +++ b/scripts/tx-v2-to-v3.py @@ -1,13 +1,17 @@ #!/usr/bin/env python3 -# Convert MMGen 'v2' transaction file (amounts as BTCAmt()) -# to MMGen 'v3' (amounts as strings) -# v3 tx files were introduced with MMGen version 0.9.7 -import sys,os -repo_root = os.path.split(os.path.abspath(os.path.dirname(sys.argv[0])))[0] -sys.path = [repo_root] + sys.path +""" +Convert an MMGen 'v2' transaction file (amounts as BTCAmt()) to 'v3' (amounts as +strings). Version 3 TX files were introduced with MMGen version 0.9.7 +""" + +import sys,os,asyncio from mmgen.cfg import Config +from mmgen.tx import CompletedTX + +repo_root = os.path.split(os.path.abspath(os.path.dirname(sys.argv[0])))[0] +sys.path = [repo_root] + sys.path opts_data = { 'text': { @@ -24,9 +28,6 @@ opts_data = { cfg = Config(opts_data=opts_data) -import asyncio -from mmgen.tx import CompletedTX - if len(cfg._args) != 1: cfg._opts.usage() diff --git a/test/gentest.py b/test/gentest.py index 97781807..e9238541 100755 --- a/test/gentest.py +++ b/test/gentest.py @@ -25,7 +25,6 @@ import sys,os,time import include.test_init # Import these _after_ local path's been added to sys.path -import mmgen.opts as opts from mmgen.cfg import gc,Config from mmgen.color import green,red,purple from mmgen.util import msg,ymsg,capfirst,is_int,die @@ -419,11 +418,10 @@ def speed_test(proto,kg,ag,rounds): qmsg(green('Testing speed of address generator {!r} for coin {}'.format( type(kg).__name__, proto.coin ))) - from struct import pack,unpack + from struct import pack seed = getrand(28) qmsg('Incrementing key with each round') qmsg('Starting key: {}'.format( (seed + pack('I',0)).hex() )) - import time start = last_t = time.time() for i in range(rounds): diff --git a/test/hashfunc.py b/test/hashfunc.py index a885d0b8..048c2d41 100755 --- a/test/hashfunc.py +++ b/test/hashfunc.py @@ -20,9 +20,9 @@ test/hashfunc.py: Test internal implementations of SHA256, SHA512 and Keccak256 """ -import sys,os +import sys import include.test_init -from mmgen.util import die,ymsg +from mmgen.util import die assert len(sys.argv) in (2,3),"Test takes 1 or 2 arguments: test name, plus optional rounds count" test = sys.argv[1].capitalize() diff --git a/test/include/pexpect.py b/test/include/pexpect.py index d1e2ef1a..783bf7f5 100755 --- a/test/include/pexpect.py +++ b/test/include/pexpect.py @@ -20,7 +20,7 @@ test.include.pexpect: pexpect implementation for MMGen test suites """ -import sys,os,time +import sys,time from mmgen.color import red,yellow,green,cyan from mmgen.util import msg,msg_r,rmsg,die from .common import cfg,vmsg,vmsg_r,getrandstr,strip_ansi_escapes diff --git a/test/misc/tool_api_test.py b/test/misc/tool_api_test.py index 1233e542..5fa779e4 100755 --- a/test/misc/tool_api_test.py +++ b/test/misc/tool_api_test.py @@ -7,7 +7,7 @@ test.misc.tool_api_test: test the MMGen suite tool API """ -import sys,os +import sys from mmgen.key import PrivKey from mmgen.addr import CoinAddr diff --git a/test/objattrtest.py b/test/objattrtest.py index 024e4408..91487f4e 100755 --- a/test/objattrtest.py +++ b/test/objattrtest.py @@ -22,7 +22,6 @@ test/objattrtest.py: Test immutable attributes of MMGen data objects # TODO: test 'typeconv' during instance creation -import sys,os from collections import namedtuple import include.test_init @@ -30,7 +29,7 @@ import include.test_init from mmgen.cfg import Config from mmgen.util import msg,msg_r,gmsg,die from mmgen.color import red,yellow,green,blue,purple,nocolor -from mmgen.obj import ImmutableAttr,ListItemAttr +from mmgen.obj import ListItemAttr opts_data = { 'sets': [ diff --git a/test/objattrtest_py_d/oat_common.py b/test/objattrtest_py_d/oat_common.py index 3a91749b..72849a8b 100755 --- a/test/objattrtest_py_d/oat_common.py +++ b/test/objattrtest_py_d/oat_common.py @@ -8,8 +8,7 @@ test.objattrtest_py_d.oat_common: shared data for MMGen data objects tests """ from decimal import Decimal - -from ..include.common import cfg,getrand +from collections import namedtuple from mmgen.obj import TwComment,CoinTxID,HexStr from mmgen.seed import Seed,SeedID @@ -17,7 +16,8 @@ from mmgen.subseed import SubSeedIdx,SubSeedList from mmgen.seedsplit import SeedShareList,SeedShareCount,SeedSplitIDString,SeedShareIdx,MasterShareIdx from mmgen.addr import AddrIdx -from collections import namedtuple +from ..include.common import cfg,getrand + atd = namedtuple('attrtest_entry',['attrs','args','kwargs']) seed_bin = getrand(32) diff --git a/test/objtest.py b/test/objtest.py index 73a8ee9d..93477290 100755 --- a/test/objtest.py +++ b/test/objtest.py @@ -20,7 +20,7 @@ test/objtest.py: Test MMGen data objects """ -import sys,os,re +import os,re import include.test_init diff --git a/test/objtest_py_d/ot_btc_mainnet.py b/test/objtest_py_d/ot_btc_mainnet.py index a59f4f04..6b189cd1 100755 --- a/test/objtest_py_d/ot_btc_mainnet.py +++ b/test/objtest_py_d/ot_btc_mainnet.py @@ -9,21 +9,21 @@ test.objtest_py_d.ot_btc_mainnet: BTC mainnet test vectors for MMGen data object from decimal import Decimal -from .ot_common import r16,r32 -from ..include.common import cfg,utf8_ctrl,utf8_text,utf8_combining,gr_uc_w_ctrl,text_jp,text_zh,ru_uc,gr_uc - from mmgen.obj import Int,MMGenTxID,CoinTxID,MMGenWalletLabel,MMGenTxComment,MMGenPWIDString from mmgen.addrlist import AddrIdx,AddrIdxList,AddrListID from mmgen.seed import Seed,SeedID -from mmgen.seedsplit import SeedShareIdx,SeedShareCount,SubSeedList,MasterShareIdx,SeedSplitSpecifier from mmgen.subseed import SubSeedList,SubSeedIdx,SubSeedIdxRange +from mmgen.seedsplit import SeedShareIdx,SeedShareCount,MasterShareIdx,SeedSplitSpecifier from mmgen.key import PrivKey,WifKey,PubKey from mmgen.amt import BTCAmt from mmgen.addr import CoinAddr,MMGenID,MMGenAddrType,MMGenPasswordType from mmgen.tw.shared import TwMMGenID,TwLabel,TwComment from mmgen.rpc import IPPort - from mmgen.protocol import init_proto + +from .ot_common import r16,r32 +from ..include.common import cfg,utf8_ctrl,utf8_text,utf8_combining,gr_uc_w_ctrl,text_jp,text_zh,ru_uc,gr_uc + proto = init_proto( cfg, 'btc', need_amt=True ) tw_pfx = proto.base_coin.lower() + ':' zero_addr = '1111111111111111111114oLvT2' diff --git a/test/objtest_py_d/ot_btc_testnet.py b/test/objtest_py_d/ot_btc_testnet.py index a3daad8d..fc501694 100755 --- a/test/objtest_py_d/ot_btc_testnet.py +++ b/test/objtest_py_d/ot_btc_testnet.py @@ -7,13 +7,13 @@ test.objtest_py_d.ot_btc_testnet: BTC testnet test vectors for MMGen data objects """ +from mmgen.key import PrivKey,WifKey +from mmgen.addr import CoinAddr +from mmgen.protocol import init_proto + from .ot_common import r16,r32 from ..include.common import cfg -from mmgen.key import PrivKey,WifKey -from mmgen.addr import CoinAddr - -from mmgen.protocol import init_proto proto = init_proto( cfg, 'btc', network='testnet', need_amt=True ) tests = { diff --git a/test/objtest_py_d/ot_ltc_mainnet.py b/test/objtest_py_d/ot_ltc_mainnet.py index b9e06aae..3fe81162 100755 --- a/test/objtest_py_d/ot_ltc_mainnet.py +++ b/test/objtest_py_d/ot_ltc_mainnet.py @@ -9,14 +9,14 @@ test.objtest_py_d.ot_ltc_mainnet: LTC mainnet test vectors for MMGen data object from decimal import Decimal -from .ot_common import r16,r32 -from ..include.common import cfg - from mmgen.amt import LTCAmt from mmgen.addr import CoinAddr from mmgen.key import WifKey,PrivKey - from mmgen.protocol import init_proto + +from .ot_common import r16,r32 +from ..include.common import cfg + proto = init_proto( cfg, 'ltc', need_amt=True ) tests = { diff --git a/test/objtest_py_d/ot_ltc_testnet.py b/test/objtest_py_d/ot_ltc_testnet.py index 8dcc4d91..dc8d4b0d 100755 --- a/test/objtest_py_d/ot_ltc_testnet.py +++ b/test/objtest_py_d/ot_ltc_testnet.py @@ -7,13 +7,13 @@ test.objtest_py_d.ot_ltc_testnet: LTC testnet test vectors for MMGen data objects """ +from mmgen.addr import CoinAddr +from mmgen.key import WifKey,PrivKey +from mmgen.protocol import init_proto + from .ot_common import r16,r32 from ..include.common import cfg -from mmgen.addr import CoinAddr -from mmgen.key import WifKey,PrivKey - -from mmgen.protocol import init_proto proto = init_proto( cfg, 'ltc', network='testnet', need_amt=True ) tests = { diff --git a/test/overlay/fakemods/mmgen/tw/view.py b/test/overlay/fakemods/mmgen/tw/view.py index a090c21a..f2bec610 100644 --- a/test/overlay/fakemods/mmgen/tw/view.py +++ b/test/overlay/fakemods/mmgen/tw/view.py @@ -1,7 +1,8 @@ import os as overlay_fake_os -from .view_orig import * import mmgen.tw.view_orig as overlay_fake_orig_mod +from .view_orig import * + overlay_fake_orig_mod.CUR_HOME = '\n[CUR_HOME]\n' overlay_fake_orig_mod.CUR_UP = lambda n: f'\n[CUR_UP({n})]\n' overlay_fake_orig_mod.CUR_DOWN = lambda n: f'\n[CUR_DOWN({n})]\n' diff --git a/test/scrambletest.py b/test/scrambletest.py index 381443bf..22a732ae 100755 --- a/test/scrambletest.py +++ b/test/scrambletest.py @@ -21,12 +21,12 @@ test/scrambletest.py: seed scrambling and addrlist data generation tests for all supported coins + passwords """ -import sys,os,time +import os,time from subprocess import run,PIPE +from collections import namedtuple import include.test_init -import mmgen.opts as opts from mmgen.cfg import gc,Config from mmgen.util import msg,msg_r,bmsg,die @@ -51,11 +51,10 @@ If no command is given, the whole suite of tests is run. cfg = Config(opts_data=opts_data) -from test.include.common import set_globals,end_msg,green +from test.include.common import set_globals,init_coverage,end_msg,green set_globals(cfg) -from collections import namedtuple td = namedtuple('scrambletest_entry',['seed','str','id_str','lbl','addr']) bitcoin_data = { diff --git a/test/test_py_d/input.py b/test/test_py_d/input.py index a89a1253..c475d9d9 100755 --- a/test/test_py_d/input.py +++ b/test/test_py_d/input.py @@ -10,7 +10,7 @@ test.test_py_d.input: Shared input routines for the test.py test suite """ -import os,time +import time from .common import randbool from ..include.common import getrand diff --git a/test/test_py_d/ts_autosign.py b/test/test_py_d/ts_autosign.py index d4b915f2..ded966b8 100755 --- a/test/test_py_d/ts_autosign.py +++ b/test/test_py_d/ts_autosign.py @@ -27,6 +27,8 @@ from pathlib import Path from mmgen.cfg import gc from mmgen.color import red,green,blue,purple from mmgen.util import msg,suf,die +from mmgen.led import LEDControl +from mmgen.autosign import Autosign,AutosignConfig from ..include.common import ( cfg, @@ -43,9 +45,6 @@ from .common import ref_dir,dfl_words_file,dfl_bip39_file from .ts_base import TestSuiteBase from .input import stealth_mnemonic_entry -from mmgen.led import LEDControl -from mmgen.autosign import Autosign,AutosignConfig - filedir_map = ( ('btc',''), ('bch',''), diff --git a/test/test_py_d/ts_cfgfile.py b/test/test_py_d/ts_cfgfile.py index ff73b45d..3a131755 100755 --- a/test/test_py_d/ts_cfgfile.py +++ b/test/test_py_d/ts_cfgfile.py @@ -12,13 +12,13 @@ test.test_py_d.ts_cfgfile: CfgFile tests for the MMGen test.py test suite import os,time,shutil -from ..include.common import cfg,read_from_file,write_to_file,imsg -from .ts_base import TestSuiteBase - from mmgen.cfg import gc from mmgen.color import yellow from mmgen.cfgfile import CfgFileSampleSys,CfgFileSampleUsr,cfg_file_sample +from ..include.common import cfg,read_from_file,write_to_file,imsg +from .ts_base import TestSuiteBase + class TestSuiteCfgFile(TestSuiteBase): 'CfgFile API' networks = ('btc',) diff --git a/test/test_py_d/ts_chainsplit.py b/test/test_py_d/ts_chainsplit.py index dfc43a7e..c242f15a 100755 --- a/test/test_py_d/ts_chainsplit.py +++ b/test/test_py_d/ts_chainsplit.py @@ -21,8 +21,6 @@ test.test_py_d.ts_chainsplit: Forking scenario tests for the test.py test suite This module is unmaintained and currently non-functional """ -import os - from mmgen.util import die from .common import get_file_with_ext diff --git a/test/test_py_d/ts_ethdev.py b/test/test_py_d/ts_ethdev.py index d548602b..5fe66f73 100755 --- a/test/test_py_d/ts_ethdev.py +++ b/test/test_py_d/ts_ethdev.py @@ -20,7 +20,7 @@ test.test_py_d.ts_ethdev: Ethdev tests for the test.py test suite """ -import sys,os,re,shutil,asyncio,json +import os,re,shutil,asyncio,json from decimal import Decimal from collections import namedtuple from subprocess import run,PIPE,DEVNULL @@ -28,7 +28,6 @@ from subprocess import run,PIPE,DEVNULL from mmgen.cfg import gc from mmgen.color import yellow,blue,cyan,set_vt100 from mmgen.util import msg,rmsg,die -from mmgen.protocol import CoinProtocol from ..include.common import ( cfg, diff --git a/test/test_py_d/ts_input.py b/test/test_py_d/ts_input.py index 59c5ccf6..dc023098 100755 --- a/test/test_py_d/ts_input.py +++ b/test/test_py_d/ts_input.py @@ -10,7 +10,11 @@ test.test_py_d.ts_input: user input tests for the MMGen test.py test suite """ -import os,time +import os + +from mmgen.cfg import gc +from mmgen.util import fmt,capfirst,remove_whitespace +from mmgen.wallet import get_wallet_cls from ..include.common import ( cfg, @@ -25,11 +29,6 @@ from .common import Ctrl_U,ref_dir from .ts_base import TestSuiteBase from .input import stealth_mnemonic_entry,user_dieroll_entry -from mmgen.cfg import gc -from mmgen.color import set_vt100 -from mmgen.util import fmt,capfirst,remove_whitespace -from mmgen.wallet import get_wallet_cls - class TestSuiteInput(TestSuiteBase): 'user input' networks = ('btc',) diff --git a/test/test_py_d/ts_opts.py b/test/test_py_d/ts_opts.py index ce711910..428aac9a 100755 --- a/test/test_py_d/ts_opts.py +++ b/test/test_py_d/ts_opts.py @@ -10,7 +10,7 @@ test.test_py_d.ts_opts: options processing tests for the MMGen test.py test suite """ -import os +import os,time from ..include.common import cfg from .ts_base import TestSuiteBase diff --git a/test/test_py_d/ts_ref.py b/test/test_py_d/ts_ref.py index 73ae166e..8e59df8f 100755 --- a/test/test_py_d/ts_ref.py +++ b/test/test_py_d/ts_ref.py @@ -30,7 +30,6 @@ from ..include.common import ( ok, joinpath, cmp_or_die, - ref_kafile_hash_preset, ref_kafile_pass, read_from_file, sample_text diff --git a/test/test_py_d/ts_ref_altcoin.py b/test/test_py_d/ts_ref_altcoin.py index f3ef7d10..55ca6d1f 100755 --- a/test/test_py_d/ts_ref_altcoin.py +++ b/test/test_py_d/ts_ref_altcoin.py @@ -20,8 +20,6 @@ test.test_py_d.ts_ref_altcoin: Altcoin reference file tests for the test.py test suite """ -import os - from mmgen.color import set_vt100 from .common import pwfile,dfl_wpasswd,ref_dir,dfl_words_file,dfl_addr_idx_list diff --git a/test/test_py_d/ts_regtest.py b/test/test_py_d/ts_regtest.py index 265b172c..ff59ea74 100755 --- a/test/test_py_d/ts_regtest.py +++ b/test/test_py_d/ts_regtest.py @@ -24,7 +24,7 @@ import os,json,time,re from decimal import Decimal from mmgen.color import yellow -from mmgen.util import msg_r,die,gmsg,capfirst,fmt_list,async_run +from mmgen.util import msg_r,die,gmsg,capfirst,fmt_list from mmgen.protocol import init_proto from mmgen.addrlist import AddrList from mmgen.wallet import Wallet,get_wallet_cls diff --git a/test/test_py_d/ts_shared.py b/test/test_py_d/ts_shared.py index b339703e..efb57264 100755 --- a/test/test_py_d/ts_shared.py +++ b/test/test_py_d/ts_shared.py @@ -20,9 +20,7 @@ test.test_py_d.ts_shared: Shared methods for the test.py test suite """ -import os - -from mmgen.util import ymsg,get_extension +from mmgen.util import get_extension from mmgen.wallet import get_wallet_cls from ..include.common import cmp_or_die,strip_ansi_escapes,joinpath diff --git a/test/test_py_d/ts_xmrwallet.py b/test/test_py_d/ts_xmrwallet.py index 731b2cda..c6f3e7df 100755 --- a/test/test_py_d/ts_xmrwallet.py +++ b/test/test_py_d/ts_xmrwallet.py @@ -20,7 +20,7 @@ test.test_py_d.ts_xmrwallet: xmrwallet tests for the test.py test suite """ -import sys,os,time,re,atexit,asyncio,shutil +import os,time,re,atexit,asyncio,shutil from subprocess import run,PIPE from collections import namedtuple diff --git a/test/tooltest.py b/test/tooltest.py index d87bffbc..ffefeae1 100755 --- a/test/tooltest.py +++ b/test/tooltest.py @@ -20,7 +20,7 @@ test/tooltest.py: Tests for the 'mmgen-tool' utility """ -import sys,os,binascii +import sys,os,time from subprocess import run,PIPE import include.test_init @@ -66,7 +66,8 @@ from test.include.common import ( getrand, getrandhex, end_msg, - init_coverage + init_coverage, + get_tmpfile, ) set_globals(cfg) @@ -460,7 +461,6 @@ class MMGenToolTestCmds: ok() # main() -import time start_time = int(time.time()) mk_tmpdir(tcfg['tmpdir']) diff --git a/test/tooltest2.py b/test/tooltest2.py index 264c869c..3b1b56c3 100755 --- a/test/tooltest2.py +++ b/test/tooltest2.py @@ -963,7 +963,7 @@ if cfg.tool_api: del tests['Wallet'] del tests['File'] -import mmgen.main_tool as main_tool +from mmgen import main_tool if cfg.list_tests: Msg('Available tests:') diff --git a/test/unit_tests_d/ut_daemon.py b/test/unit_tests_d/ut_daemon.py index c3701f2e..c46ea56b 100755 --- a/test/unit_tests_d/ut_daemon.py +++ b/test/unit_tests_d/ut_daemon.py @@ -4,13 +4,12 @@ test.unit_tests_d.ut_daemon: unit test for the MMGen suite's Daemon class """ -from subprocess import run,DEVNULL,PIPE +from subprocess import run,PIPE from collections import namedtuple from mmgen.color import orange from mmgen.util import fmt_list from mmgen.daemon import CoinDaemon -from mmgen.protocol import init_proto from ..include.common import cfg,qmsg,qmsg_r,vmsg diff --git a/test/unit_tests_d/ut_msg.py b/test/unit_tests_d/ut_msg.py index a18eb85e..2425488a 100755 --- a/test/unit_tests_d/ut_msg.py +++ b/test/unit_tests_d/ut_msg.py @@ -6,12 +6,13 @@ test.unit_tests_d.ut_msg: message signing unit tests for the MMGen suite import os -from ..include.common import cfg,silence,end_silence,restart_test_daemons,stop_test_daemons from mmgen.util import msg,bmsg,pumsg,suf from mmgen.protocol import CoinProtocol from mmgen.msg import NewMsg,UnsignedMsg,SignedMsg,SignedOnlineMsg,ExportedMsgSigs from mmgen.addr import MMGenID +from ..include.common import cfg,silence,end_silence,restart_test_daemons,stop_test_daemons + def get_obj(coin,network,msghash_type): if coin == 'bch': diff --git a/test/unit_tests_d/ut_scrypt.py b/test/unit_tests_d/ut_scrypt.py index 04abc758..f4ba9680 100755 --- a/test/unit_tests_d/ut_scrypt.py +++ b/test/unit_tests_d/ut_scrypt.py @@ -4,9 +4,10 @@ test.unit_tests_d.ut_scrypt: password hashing unit test for the MMGen suite """ -from ..include.common import cfg,qmsg,vmsg,omsg_r,silence,end_silence from mmgen.util import msg,msg_r +from ..include.common import cfg,qmsg,vmsg,omsg_r,silence,end_silence + class unit_test: def run_test(self,name,ut): diff --git a/test/unit_tests_d/ut_tx_deserialize.py b/test/unit_tests_d/ut_tx_deserialize.py index 450a8822..72931fa7 100755 --- a/test/unit_tests_d/ut_tx_deserialize.py +++ b/test/unit_tests_d/ut_tx_deserialize.py @@ -12,7 +12,6 @@ from mmgen.protocol import init_proto from mmgen.tx import CompletedTX from mmgen.proto.btc.tx.base import DeserializeTX from mmgen.rpc import rpc_init -from mmgen.daemon import CoinDaemon from ..include.common import cfg,start_test_daemons,stop_test_daemons diff --git a/test/unit_tests_d/ut_util.py b/test/unit_tests_d/ut_util.py index faf0f025..85ec0ca9 100755 --- a/test/unit_tests_d/ut_util.py +++ b/test/unit_tests_d/ut_util.py @@ -4,9 +4,10 @@ test.unit_tests_d.ut_misc: utility unit tests for the MMGen suite """ -from ..include.common import vmsg -from mmgen.util import fmt_list,fmt_dict,list_gen from mmgen.color import cyan +from mmgen.util import fmt_list,fmt_dict,list_gen + +from ..include.common import vmsg class unit_tests: