diff --git a/test/colortest.py b/test/colortest.py index 2a266bd4..57f89512 100755 --- a/test/colortest.py +++ b/test/colortest.py @@ -7,8 +7,8 @@ colortest.py: test color handling for the MMGen suite """ -import tests_header -from test.common import * +import include.tests_header +from include.common import * from mmgen.color import * from mmgen.color import _colors init_color() diff --git a/test/hashfunc.py b/test/hashfunc.py index 6f29bb90..aa9075de 100755 --- a/test/hashfunc.py +++ b/test/hashfunc.py @@ -20,7 +20,7 @@ test/hashfunc.py: Test internal implementations of SHA256, SHA512 and Keccak256 """ import sys,os -import tests_header +import include.tests_header from mmgen.util import die assert len(sys.argv) in (2,3),"Test takes 1 or 2 arguments: test name, plus optional rounds count" diff --git a/test/include/__init__.py b/test/include/__init__.py new file mode 100755 index 00000000..e69de29b diff --git a/test/common.py b/test/include/common.py similarity index 100% rename from test/common.py rename to test/include/common.py diff --git a/test/pexpect.py b/test/include/pexpect.py similarity index 99% rename from test/pexpect.py rename to test/include/pexpect.py index 6a9d19b0..adfb6a78 100755 --- a/test/pexpect.py +++ b/test/include/pexpect.py @@ -24,7 +24,7 @@ import sys,os,time from mmgen.globalvars import g from mmgen.opts import opt from mmgen.util import msg,msg_r,vmsg,vmsg_r,rmsg,red,yellow,green,cyan,die,rdie -from test.common import * +from .common import * try: import pexpect diff --git a/test/tests_header.py b/test/include/tests_header.py similarity index 100% rename from test/tests_header.py rename to test/include/tests_header.py diff --git a/test/misc/utf8_output.py b/test/misc/utf8_output.py index cc339117..16805001 100755 --- a/test/misc/utf8_output.py +++ b/test/misc/utf8_output.py @@ -13,6 +13,7 @@ text = { 'jp': 'Japanese text: {}'.format('必要なのは、信用ではなく暗号化された証明に基づく電子取引システムであり、') } -assert cmd_args[0] in text,'argument must be one of {}'.format(list(text.keys())) +if not cmd_args or not cmd_args[0] in text: + die(2,'argument must be one of {}'.format(list(text.keys()))) msg(text[cmd_args[0]]) diff --git a/test/objtest_py_d/ot_common.py b/test/objtest_py_d/ot_common.py index d3d1c7c0..75162ae2 100755 --- a/test/objtest_py_d/ot_common.py +++ b/test/objtest_py_d/ot_common.py @@ -9,7 +9,7 @@ test.objtest_py_d.ot_common: shared data for MMGen data objects tests import os from mmgen.globalvars import g -from ..common import * +from ..include.common import * r32,r24,r16,r17,r18 = os.urandom(32),os.urandom(24),os.urandom(16),os.urandom(17),os.urandom(18) tw_pfx = g.proto.base_coin.lower()+':' diff --git a/test/scrambletest.py b/test/scrambletest.py index ab1afd43..fbb71b63 100755 --- a/test/scrambletest.py +++ b/test/scrambletest.py @@ -24,9 +24,9 @@ supported coins + passwords import sys,os from subprocess import run,PIPE -from tests_header import repo_root +from include.tests_header import repo_root from mmgen.common import * -from test.common import * +from test.include.common import * opts_data = { 'text': { diff --git a/test/start-coin-daemons.py b/test/start-coin-daemons.py index 17f89af1..48910202 100755 --- a/test/start-coin-daemons.py +++ b/test/start-coin-daemons.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import sys -from tests_header import repo_root +from include.tests_header import repo_root from mmgen.common import * from mmgen.daemon import CoinDaemon from mmgen.regtest import MMGenRegtest diff --git a/test/test.py b/test/test.py index e0f780f0..3f09b5bd 100755 --- a/test/test.py +++ b/test/test.py @@ -71,14 +71,14 @@ def create_shm_dir(data_dir,trash_dir): return shm_dir import sys,os,time -from tests_header import repo_root +from include.tests_header import repo_root try: os.unlink(os.path.join(repo_root,'my.err')) except: pass from mmgen.common import * from mmgen.daemon import CoinDaemon -from test.common import * +from test.include.common import * from test.test_py_d.common import * g.quiet = False # if 'quiet' was set in config file, disable here @@ -666,7 +666,7 @@ class TestSuiteRunner(object): except: self.log_fd.write(ascii(cmd_disp)+'\n') - from test.pexpect import MMGenPexpect + from test.include.pexpect import MMGenPexpect return MMGenPexpect(args,no_output=no_output) def end_msg(self): diff --git a/test/test_py_d/common.py b/test/test_py_d/common.py index f97dab04..74df6793 100755 --- a/test/test_py_d/common.py +++ b/test/test_py_d/common.py @@ -20,9 +20,9 @@ common.py: Shared routines and data for the test.py test suite """ -import os,time +import os from mmgen.common import * -from ..common import * +from ..include.common import * log_file = 'test.py.log' @@ -113,30 +113,29 @@ def get_file_with_ext(tdir,ext,delete=True,no_dot=False,return_list=False,delete else: return flist[0] -labels = [ - "Automotive", - "Travel expenses", - "Healthcare", - tx_label_jp[:40], - tx_label_zh[:40], - "Alice's allowance", - "Bob's bequest", - "House purchase", - "Real estate fund", - "Job 1", - "XYZ Corp.", - "Eddie's endowment", - "Emergency fund", - "Real estate fund", - "Ian's inheritance", - "", - "Rainy day", - "Fred's funds", - "Job 2", - "Carl's capital", -] - def get_label(do_shuffle=False): + labels = [ + "Automotive", + "Travel expenses", + "Healthcare", + tx_label_jp[:40], + tx_label_zh[:40], + "Alice's allowance", + "Bob's bequest", + "House purchase", + "Real estate fund", + "Job 1", + "XYZ Corp.", + "Eddie's endowment", + "Emergency fund", + "Real estate fund", + "Ian's inheritance", + "", + "Rainy day", + "Fred's funds", + "Job 2", + "Carl's capital", + ] from random import shuffle global label_iter try: @@ -145,60 +144,3 @@ def get_label(do_shuffle=False): if do_shuffle: shuffle(labels) label_iter = iter(labels) return next(label_iter) - -def stealth_mnemonic_entry(t,mne,mn,entry_mode,pad_entry=False): - - def pad_mnemonic(mn,ss_len): - def get_pad_chars(n): - ret = '' - for i in range(n): - m = int.from_bytes(os.urandom(1),'big') % 32 - ret += r'123579!@#$%^&*()_+-=[]{}"?/,.<>|'[m] - return ret - ret = [] - for w in mn: - if entry_mode == 'short': - w = w[:ss_len] - if len(w) < ss_len: - npc = 3 - w = w[0] + get_pad_chars(npc) + w[1:] - if pad_entry: - w += '%' * (1 + mne.em.pad_max - npc) - else: - w += '\n' - else: - w = get_pad_chars(1) + w[0] + get_pad_chars(1) + w[1:] - elif len(w) > (3,5)[ss_len==12]: - w = w + '\n' - else: - w = ( - get_pad_chars(2 if randbool() and entry_mode != 'short' else 0) - + w[0] + get_pad_chars(2) + w[1:] - + get_pad_chars(9) ) - w = w[:ss_len+1] - ret.append(w) - return ret - - if entry_mode == 'fixed': - mn = ['bkr'] + mn[:5] + ['nfb'] + mn[5:] - ssl = mne.uniq_ss_len - mn = [w[:ssl] if len(w) >= ssl else (w[0] + 'z\b{}'.format('#'*(ssl-len(w))) + w[1:]) for w in mn] - elif entry_mode in ('full','short'): - mn = ['fzr'] + mn[:5] + ['grd','grdbxm'] + mn[5:] - mn = pad_mnemonic(mn,mne.em.ss_len) - mn[10] = '@#$%*##' + mn[10] - - wnum = 1 - p_ok,p_err = mne.word_prompt - for w in mn: - ret = t.expect((p_ok.format(wnum),p_err.format(wnum-1))) - if ret == 0: - wnum += 1 - for j in range(len(w)): - t.send(w[j]) - time.sleep(0.005) - -def user_dieroll_entry(t,data): - for s in data: - t.expect(r'Enter die roll #.+: ',s,regex=True) - time.sleep(0.005) diff --git a/test/test_py_d/input.py b/test/test_py_d/input.py new file mode 100755 index 00000000..f9690a5a --- /dev/null +++ b/test/test_py_d/input.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 +# +# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution +# Copyright (C)2013-2020 The MMGen Project +# +# Project source code repository: https://github.com/mmgen/mmgen +# Licensed according to the terms of GPL Version 3. See LICENSE for details. + +""" +input.py: Shared input routines for the test.py test suite +""" + +import os,time +from .common import randbool + +def stealth_mnemonic_entry(t,mne,mn,entry_mode,pad_entry=False): + + def pad_mnemonic(mn,ss_len): + def get_pad_chars(n): + ret = '' + for i in range(n): + m = int.from_bytes(os.urandom(1),'big') % 32 + ret += r'123579!@#$%^&*()_+-=[]{}"?/,.<>|'[m] + return ret + ret = [] + for w in mn: + if entry_mode == 'short': + w = w[:ss_len] + if len(w) < ss_len: + npc = 3 + w = w[0] + get_pad_chars(npc) + w[1:] + if pad_entry: + w += '%' * (1 + mne.em.pad_max - npc) + else: + w += '\n' + else: + w = get_pad_chars(1) + w[0] + get_pad_chars(1) + w[1:] + elif len(w) > (3,5)[ss_len==12]: + w = w + '\n' + else: + w = ( + get_pad_chars(2 if randbool() and entry_mode != 'short' else 0) + + w[0] + get_pad_chars(2) + w[1:] + + get_pad_chars(9) ) + w = w[:ss_len+1] + ret.append(w) + return ret + + if entry_mode == 'fixed': + mn = ['bkr'] + mn[:5] + ['nfb'] + mn[5:] + ssl = mne.uniq_ss_len + mn = [w[:ssl] if len(w) >= ssl else (w[0] + 'z\b{}'.format('#'*(ssl-len(w))) + w[1:]) for w in mn] + elif entry_mode in ('full','short'): + mn = ['fzr'] + mn[:5] + ['grd','grdbxm'] + mn[5:] + mn = pad_mnemonic(mn,mne.em.ss_len) + mn[10] = '@#$%*##' + mn[10] + + wnum = 1 + p_ok,p_err = mne.word_prompt + for w in mn: + ret = t.expect((p_ok.format(wnum),p_err.format(wnum-1))) + if ret == 0: + wnum += 1 + for j in range(len(w)): + t.send(w[j]) + time.sleep(0.005) + +def user_dieroll_entry(t,data): + for s in data: + t.expect(r'Enter die roll #.+: ',s,regex=True) + time.sleep(0.005) diff --git a/test/test_py_d/ts_autosign.py b/test/test_py_d/ts_autosign.py index 4203a3b9..e81407a0 100755 --- a/test/test_py_d/ts_autosign.py +++ b/test/test_py_d/ts_autosign.py @@ -25,11 +25,12 @@ from subprocess import run from mmgen.globalvars import g from mmgen.opts import opt -from test.common import * -from test.test_py_d.common import * +from ..include.common import * +from .common import * -from test.test_py_d.ts_base import * -from test.test_py_d.ts_shared import * +from .ts_base import * +from .ts_shared import * +from .input import * class TestSuiteAutosign(TestSuiteBase): 'autosigning with BTC, BCH, LTC, ETH and ETC' @@ -86,7 +87,7 @@ class TestSuiteAutosign(TestSuiteBase): ('mm1','ethereum'), ('etc','ethereum_classic')) fdata = [e for e in fdata_in if e[0] in txfiles] - from test.test_py_d.ts_ref import TestSuiteRef + from .ts_ref import TestSuiteRef tfns = [TestSuiteRef.sources['ref_tx_file'][c][1] for c,d in fdata] + \ [TestSuiteRef.sources['ref_tx_file'][c][0] for c,d in fdata] + \ ['25EFA3[2.34].testnet.rawtx'] # TX with 2 non-MMGen outputs diff --git a/test/test_py_d/ts_base.py b/test/test_py_d/ts_base.py index 3e296240..c2e24398 100755 --- a/test/test_py_d/ts_base.py +++ b/test/test_py_d/ts_base.py @@ -23,8 +23,8 @@ ts_base.py: Base class for the test.py test suite import os from mmgen.globalvars import g from mmgen.opts import opt -from test.common import * -from test.test_py_d.common import * +from ..include.common import * +from .common import * class TestSuiteBase(object): 'initializer class for the test.py test suite' diff --git a/test/test_py_d/ts_cfg.py b/test/test_py_d/ts_cfg.py index c4420c65..f6d1c3eb 100755 --- a/test/test_py_d/ts_cfg.py +++ b/test/test_py_d/ts_cfg.py @@ -12,8 +12,8 @@ ts_misc.py: CfgFile tests for the MMGen test.py test suite import shutil -from test.common import * -from test.test_py_d.ts_base import * +from ..include.common import * +from .ts_base import * from mmgen.cfg import * class TestSuiteCfg(TestSuiteBase): diff --git a/test/test_py_d/ts_chainsplit.py b/test/test_py_d/ts_chainsplit.py index 5cb84199..3e4e76ef 100755 --- a/test/test_py_d/ts_chainsplit.py +++ b/test/test_py_d/ts_chainsplit.py @@ -24,12 +24,12 @@ import os from mmgen.globalvars import g from mmgen.opts import opt from mmgen.util import die -from test.common import * -from test.test_py_d.common import * +from ..include.common import * +from .common import * -from test.test_py_d.ts_base import * -from test.test_py_d.ts_shared import * -from test.test_py_d.ts_regtest import * +from .ts_base import * +from .ts_shared import * +from .ts_regtest import * class TestSuiteChainsplit(TestSuiteRegtest): 'forking scenario tests for the test.py test suite' diff --git a/test/test_py_d/ts_ethdev.py b/test/test_py_d/ts_ethdev.py index bfeee259..97018ce8 100755 --- a/test/test_py_d/ts_ethdev.py +++ b/test/test_py_d/ts_ethdev.py @@ -28,8 +28,8 @@ from mmgen.globalvars import g from mmgen.opts import opt from mmgen.util import die from mmgen.exception import * -from test.common import * -from test.test_py_d.common import * +from ..include.common import * +from .common import * del_addrs = ('4','1') dfl_sid = '98831F3A' @@ -132,8 +132,8 @@ token_bals_getbalance = { '2': ('111.888877776666555545','888.111122223333444455') } -from test.test_py_d.ts_base import * -from test.test_py_d.ts_shared import * +from .ts_base import * +from .ts_shared import * class TestSuiteEthdev(TestSuiteBase,TestSuiteShared): 'Ethereum transacting, token deployment and tracking wallet operations' diff --git a/test/test_py_d/ts_input.py b/test/test_py_d/ts_input.py index d796004b..f902c423 100755 --- a/test/test_py_d/ts_input.py +++ b/test/test_py_d/ts_input.py @@ -10,8 +10,9 @@ ts_input.py: user input tests for the MMGen test.py test suite """ -from test.common import * -from test.test_py_d.ts_base import * +from ..include.common import * +from .ts_base import * +from .input import * from mmgen.seed import SeedSource class TestSuiteInput(TestSuiteBase): diff --git a/test/test_py_d/ts_main.py b/test/test_py_d/ts_main.py index 40199aff..d2130719 100755 --- a/test/test_py_d/ts_main.py +++ b/test/test_py_d/ts_main.py @@ -23,10 +23,10 @@ ts_main.py: Basic operations tests for the test.py test suite from mmgen.globalvars import g from mmgen.opts import opt from mmgen.seed import SeedSource,Wallet,MMGenMnemonic,IncogWallet,MMGenSeedFile -from test.common import * -from test.test_py_d.common import * -from test.test_py_d.ts_base import * -from test.test_py_d.ts_shared import * +from ..include.common import * +from .common import * +from .ts_base import * +from .ts_shared import * def make_brainwallet_file(fn): # Print random words with random whitespace in between diff --git a/test/test_py_d/ts_misc.py b/test/test_py_d/ts_misc.py index ee5e1b8b..e3ce2d81 100755 --- a/test/test_py_d/ts_misc.py +++ b/test/test_py_d/ts_misc.py @@ -21,10 +21,10 @@ ts_misc.py: Miscellaneous test groups for the test.py test suite """ from mmgen.globalvars import g -from test.common import * -from test.test_py_d.common import * -from test.test_py_d.ts_base import * -from test.test_py_d.ts_main import TestSuiteMain +from ..include.common import * +from .common import * +from .ts_base import * +from .ts_main import TestSuiteMain class TestSuiteHelp(TestSuiteBase): 'help, info and usage screens' diff --git a/test/test_py_d/ts_opts.py b/test/test_py_d/ts_opts.py index a4a9180a..31043f83 100755 --- a/test/test_py_d/ts_opts.py +++ b/test/test_py_d/ts_opts.py @@ -10,8 +10,8 @@ ts_opts.py: options processing tests for the MMGen test.py test suite """ -from test.common import * -from test.test_py_d.ts_base import * +from ..include.common import * +from .ts_base import * class TestSuiteOpts(TestSuiteBase): 'options processing' diff --git a/test/test_py_d/ts_ref.py b/test/test_py_d/ts_ref.py index 99977680..7e16750e 100755 --- a/test/test_py_d/ts_ref.py +++ b/test/test_py_d/ts_ref.py @@ -24,11 +24,11 @@ import os from mmgen.globalvars import g from mmgen.opts import opt from mmgen.seed import MMGenMnemonic -from test.common import * -from test.test_py_d.common import * +from ..include.common import * +from .common import * -from test.test_py_d.ts_base import * -from test.test_py_d.ts_shared import * +from .ts_base import * +from .ts_shared import * wpasswd = 'reference password' nw_name = '{} {}'.format(g.coin,('Mainnet','Testnet')[g.testnet]) diff --git a/test/test_py_d/ts_ref_3seed.py b/test/test_py_d/ts_ref_3seed.py index d474277e..9223e660 100755 --- a/test/test_py_d/ts_ref_3seed.py +++ b/test/test_py_d/ts_ref_3seed.py @@ -24,11 +24,11 @@ ts_ref_3seed.py: Saved and generated reference file tests for 128, 192 and from mmgen.globalvars import g from mmgen.opts import opt from mmgen.seed import SeedSource -from test.common import * -from test.test_py_d.common import * -from test.test_py_d.ts_base import * -from test.test_py_d.ts_shared import * -from test.test_py_d.ts_wallet import TestSuiteWalletConv +from ..include.common import * +from .common import * +from .ts_base import * +from .ts_shared import * +from .ts_wallet import TestSuiteWalletConv class TestSuiteRef3Seed(TestSuiteBase,TestSuiteShared): 'saved wallet files for 128-, 192- and 256-bit seeds + generated filename checks' diff --git a/test/test_py_d/ts_ref_altcoin.py b/test/test_py_d/ts_ref_altcoin.py index c6756976..5d94f33f 100755 --- a/test/test_py_d/ts_ref_altcoin.py +++ b/test/test_py_d/ts_ref_altcoin.py @@ -23,9 +23,9 @@ ts_ref_altcoin.py: Altcoin reference file tests for the test.py test suite import os from mmgen.globalvars import g from mmgen.opts import opt -from test.test_py_d.common import * -from test.test_py_d.ts_ref import * -from test.test_py_d.ts_base import * +from .common import * +from .ts_ref import * +from .ts_base import * class TestSuiteRefAltcoin(TestSuiteRef,TestSuiteBase): 'saved and generated altcoin reference files' diff --git a/test/test_py_d/ts_regtest.py b/test/test_py_d/ts_regtest.py index 9a16d361..cef9ea0c 100755 --- a/test/test_py_d/ts_regtest.py +++ b/test/test_py_d/ts_regtest.py @@ -28,8 +28,8 @@ from mmgen.util import die,gmsg,write_data_to_file from mmgen.protocol import CoinProtocol from mmgen.addr import AddrList from mmgen.seed import Wallet -from test.common import * -from test.test_py_d.common import * +from ..include.common import * +from .common import * dfl_wcls = Wallet rt_pw = 'abc-α' @@ -128,8 +128,8 @@ rt_data = { } } -from test.test_py_d.ts_base import * -from test.test_py_d.ts_shared import * +from .ts_base import * +from .ts_shared import * class TestSuiteRegtest(TestSuiteBase,TestSuiteShared): 'transacting and tracking wallet operations via regtest mode' diff --git a/test/test_py_d/ts_seedsplit.py b/test/test_py_d/ts_seedsplit.py index d23a7316..46ef3b5b 100755 --- a/test/test_py_d/ts_seedsplit.py +++ b/test/test_py_d/ts_seedsplit.py @@ -24,7 +24,7 @@ from mmgen.globalvars import g from mmgen.opts import opt from mmgen.seed import SeedSource,Wallet,IncogWallet,IncogWalletHex,IncogWalletHidden,SeedSourceEnc -from test.test_py_d.ts_base import * +from .ts_base import * ref_wf = 'test/ref/98831F3A.bip39' ref_sid = '98831F3A' diff --git a/test/test_py_d/ts_shared.py b/test/test_py_d/ts_shared.py index d10ec1f7..d7f4174c 100755 --- a/test/test_py_d/ts_shared.py +++ b/test/test_py_d/ts_shared.py @@ -25,8 +25,8 @@ from mmgen.globalvars import g from mmgen.opts import opt from mmgen.util import ymsg from mmgen.seed import SeedSource,SeedSourceEnc,Brainwallet,Wallet,IncogWalletHidden -from test.test_py_d.common import * -from test.common import * +from ..include.common import * +from .common import * class TestSuiteShared(object): 'shared methods for the test.py test suite' diff --git a/test/test_py_d/ts_tool.py b/test/test_py_d/ts_tool.py index e5f63b10..408e9cc4 100755 --- a/test/test_py_d/ts_tool.py +++ b/test/test_py_d/ts_tool.py @@ -10,9 +10,9 @@ ts_tool.py: tool tests for the MMGen test.py test suite """ -from test.common import * -from test.test_py_d.ts_base import * -from test.test_py_d.ts_main import TestSuiteMain +from ..include.common import * +from .ts_base import * +from .ts_main import TestSuiteMain class TestSuiteTool(TestSuiteMain,TestSuiteBase): "interactive 'mmgen-tool' commands" diff --git a/test/test_py_d/ts_wallet.py b/test/test_py_d/ts_wallet.py index 49100e32..f941099e 100755 --- a/test/test_py_d/ts_wallet.py +++ b/test/test_py_d/ts_wallet.py @@ -23,9 +23,9 @@ ts_wallet.py: Wallet conversion tests for the test.py test suite import os from mmgen.opts import opt from mmgen.seed import * -from test.test_py_d.common import * -from test.test_py_d.ts_base import * -from test.test_py_d.ts_shared import * +from .common import * +from .ts_base import * +from .ts_shared import * class TestSuiteWalletConv(TestSuiteBase,TestSuiteShared): 'wallet conversion to and from reference data' diff --git a/test/tooltest.py b/test/tooltest.py index 5536d84b..9d0ee8e8 100755 --- a/test/tooltest.py +++ b/test/tooltest.py @@ -23,9 +23,9 @@ test/tooltest.py: Tests for the 'mmgen-tool' utility import sys,os,binascii from subprocess import run,PIPE -from tests_header import repo_root +from include.tests_header import repo_root from mmgen.common import * -from test.common import * +from test.include.common import * opts_data = { 'text': { diff --git a/test/tooltest2.py b/test/tooltest2.py index 995fd370..9bc1deb5 100755 --- a/test/tooltest2.py +++ b/test/tooltest2.py @@ -27,9 +27,9 @@ import sys,os,time from subprocess import run,PIPE from decimal import Decimal -from tests_header import repo_root +from include.tests_header import repo_root from mmgen.common import * -from test.common import * +from test.include.common import * from mmgen.obj import is_wif,is_coin_addr from mmgen.seed import is_bip39_mnemonic,is_mmgen_mnemonic from mmgen.addr import is_xmrseed diff --git a/test/unit_tests.py b/test/unit_tests.py index 2654d30f..7f3664d5 100755 --- a/test/unit_tests.py +++ b/test/unit_tests.py @@ -22,7 +22,7 @@ test/unit_tests.py: Unit tests for the MMGen suite import sys,os,time -from tests_header import repo_root +from include.tests_header import repo_root from mmgen.common import * opts_data = { diff --git a/test/unit_tests_d/ut_scrypt.py b/test/unit_tests_d/ut_scrypt.py index 5d463a9a..04f3b349 100755 --- a/test/unit_tests_d/ut_scrypt.py +++ b/test/unit_tests_d/ut_scrypt.py @@ -3,7 +3,7 @@ test/unit_tests_d/ut_scrypt.py: password hashing unit test for the MMGen suite """ -from test.common import * +from ..include.common import * class unit_test(object): diff --git a/test/unit_tests_d/ut_tx_deserialize.py b/test/unit_tests_d/ut_tx_deserialize.py index 08bb847a..eec560dc 100755 --- a/test/unit_tests_d/ut_tx_deserialize.py +++ b/test/unit_tests_d/ut_tx_deserialize.py @@ -5,7 +5,7 @@ test/unit_tests_d/ut_tx_deserialize: TX deserialization unit test for the MMGen import os from mmgen.common import * -from test.common import * +from ..include.common import * class unit_test(object):