modtest.py, daemontest.py: remove prefixes from test files
This commit is contained in:
parent
3faef52096
commit
8b504c895a
32 changed files with 47 additions and 49 deletions
|
|
@ -36,10 +36,10 @@ ignore = [
|
|||
]
|
||||
"test/include/common.py" = [ "F821" ] # undefined name 'cfg'
|
||||
"test/misc/input_func.py" = [ "F401" ] # imported but unused
|
||||
"test/modtest_d/ut_cashaddr.py" = [ "F841" ] # assigned to but never used
|
||||
"test/modtest_d/ut_dep.py" = [ "F401" ] # imported but unused
|
||||
"test/modtest_d/ut_testdep.py" = [ "F401" ] # imported but unused
|
||||
"test/modtest_d/ut_obj.py" = [ "F841" ] # assigned to but never used
|
||||
"test/modtest_d/cashaddr.py" = [ "F841" ] # assigned to but never used
|
||||
"test/modtest_d/dep.py" = [ "F401" ] # imported but unused
|
||||
"test/modtest_d/testdep.py" = [ "F401" ] # imported but unused
|
||||
"test/modtest_d/obj.py" = [ "F841" ] # assigned to but never used
|
||||
"test/objtest_d/*" = [ "F401" ] # imported but unused
|
||||
"test/objattrtest_d/*" = [ "F401" ] # imported but unused
|
||||
"test/overlay/fakemods/*" = [ "F403", "F405" ] # `import *` used
|
||||
|
|
@ -61,7 +61,7 @@ ignore = [
|
|||
"pyethereum",
|
||||
"rlp",
|
||||
"main_split.py",
|
||||
"ut_tx.py",
|
||||
"tx.py",
|
||||
]
|
||||
ignored-modules = [ # ignored for no-member, otherwise checked
|
||||
"mmgen.proto.secp256k1.secp256k1",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
test.daemontest_d.ut_exec: unit test for the MMGen suite's Daemon class
|
||||
test.daemontest_d.exec: unit test for the MMGen suite's Daemon class
|
||||
"""
|
||||
|
||||
from subprocess import run, PIPE
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
test.daemontest_d.ut_msg: message signing unit tests for the MMGen suite
|
||||
test.daemontest_d.msg: message signing unit tests for the MMGen suite
|
||||
"""
|
||||
|
||||
import os
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
test.daemontest_d.ut_rpc: RPC unit test for the MMGen suite
|
||||
test.daemontest_d.rpc: RPC unit test for the MMGen suite
|
||||
"""
|
||||
|
||||
import sys, os
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
test.daemontest_d.ut_tx: TX daemon tests for the MMGen suite
|
||||
test.daemontest_d.tx: TX daemon tests for the MMGen suite
|
||||
"""
|
||||
|
||||
import json
|
||||
|
|
@ -77,8 +77,6 @@ type(cfg)._reset_ok += ('use_internal_keccak_module', 'debug_addrlist')
|
|||
|
||||
set_globals(cfg)
|
||||
|
||||
file_pfx = 'ut_'
|
||||
|
||||
test_type = {
|
||||
'modtest.py': 'unit',
|
||||
'daemontest.py': 'daemon',
|
||||
|
|
@ -88,7 +86,7 @@ test_subdir = gc.prog_name.removesuffix('.py') + '_d'
|
|||
|
||||
test_dir = os.path.join(repo_root, 'test', test_subdir)
|
||||
|
||||
all_tests = sorted(fn[len(file_pfx):-len('.py')] for fn in os.listdir(test_dir) if fn.startswith(file_pfx))
|
||||
all_tests = sorted(fn.removesuffix('.py') for fn in os.listdir(test_dir) if not fn.startswith('_'))
|
||||
|
||||
exclude = cfg.exclude.split(',') if cfg.exclude else []
|
||||
|
||||
|
|
@ -105,7 +103,7 @@ if cfg.list:
|
|||
if cfg.list_subtests:
|
||||
def gen():
|
||||
for test in all_tests:
|
||||
mod = importlib.import_module(f'test.{test_subdir}.{file_pfx}{test}')
|
||||
mod = importlib.import_module(f'test.{test_subdir}.{test}')
|
||||
if hasattr(mod, 'unit_tests'):
|
||||
t = getattr(mod, 'unit_tests')
|
||||
subtests = [k for k, v in t.__dict__.items() if type(v).__name__ == 'function' and k[0] != '_']
|
||||
|
|
@ -154,7 +152,7 @@ class UnitTestHelpers:
|
|||
tests_seen = []
|
||||
|
||||
def run_test(test, subtest=None):
|
||||
mod = importlib.import_module(f'test.{test_subdir}.{file_pfx}{test}')
|
||||
mod = importlib.import_module(f'test.{test_subdir}.{test}')
|
||||
|
||||
def run_subtest(t, subtest):
|
||||
subtest_disp = subtest.replace('_', '-')
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
test.modtest_d.ut_addrlist: address list unit tests for the MMGen suite
|
||||
test.modtest_d.addrlist: address list unit tests for the MMGen suite
|
||||
"""
|
||||
|
||||
from mmgen.color import blue
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
test.modtest_d.ut_addrparse: address parsing tests for the MMGen suite
|
||||
test.modtest_d.addrparse: address parsing tests for the MMGen suite
|
||||
"""
|
||||
|
||||
from mmgen.color import yellow, cyan
|
||||
|
|
@ -21,7 +21,7 @@ vectors = {
|
|||
{'std': 'ltc1qvmqas4maw7lg9clqu6kqu9zq9cluvllnst5pxs'}
|
||||
],
|
||||
'xmr_mainnet': [
|
||||
{ # ut_xmrseed.vectors[0]:
|
||||
{ # xmrseed.vectors[0]:
|
||||
'std': '42ey1afDFnn4886T7196doS9GPMzexD9gXpsZJDwVjeRVdFCSoHnv7KPbBeGpzJBzHRCAs9UxqeoyFQMYbqSWYTfJJQAWDm',
|
||||
# https://github.com/monero-project/monero/tests/functional_tests/integrated_address.py
|
||||
'int': '4CMe2PUhs4J4886T7196doS9GPMzexD9gXpsZJDwVjeRVdFCSoHnv7KPbBeGpzJBzHRCAs9UxqeoyFQMYbqSWYTfSbLRB61BQVATzerHGj',
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
test.modtest_d.ut_amt: CoinAmt unit tests for the MMGen suite
|
||||
test.modtest_d.amt: CoinAmt unit tests for the MMGen suite
|
||||
"""
|
||||
|
||||
from decimal import Decimal
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
test.modtest_d.ut_baseconv: Base conversion unit test for the MMGen suite
|
||||
test.modtest_d.baseconv: Base conversion unit test for the MMGen suite
|
||||
"""
|
||||
|
||||
from mmgen.util import msg, msg_r
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
test.modtest_d.ut_bip39: BIP39 unit test for the MMGen suite
|
||||
test.modtest_d.bip39: BIP39 unit test for the MMGen suite
|
||||
"""
|
||||
|
||||
from mmgen.color import blue, orange, purple
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
test.modtest_d.ut_bip_hd: bip_hd unit test for the MMGen suite
|
||||
test.modtest_d.bip_hd: bip_hd unit test for the MMGen suite
|
||||
"""
|
||||
|
||||
from mmgen.color import gray, pink, blue
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
test.modtest_d.ut_cashaddr: unit test for the BCH cashaddr module
|
||||
test.modtest_d.cashaddr: unit test for the BCH cashaddr module
|
||||
"""
|
||||
|
||||
altcoin_dep = True
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
test.modtest_d.ut_dep: dependency unit tests for the MMGen suite
|
||||
test.modtest_d.dep: dependency unit tests for the MMGen suite
|
||||
|
||||
Test whether dependencies are installed and functional.
|
||||
No data verification is performed.
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
test.modtest_d.ut_devtools: devtools unit tests for the MMGen suite
|
||||
test.modtest_d.devtools: devtools unit tests for the MMGen suite
|
||||
"""
|
||||
|
||||
import os, json
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
test.modtest_d.ut_ecc: elliptic curve unit test for the MMGen suite
|
||||
test.modtest_d.ecc: elliptic curve unit test for the MMGen suite
|
||||
"""
|
||||
|
||||
from mmgen.proto.secp256k1.secp256k1 import pubkey_gen, pubkey_tweak_add, pubkey_check
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
test.modtest_d.ut_flags: unit test for the MMGen suite's ClassFlags class
|
||||
test.modtest_d.flags: unit test for the MMGen suite's ClassFlags class
|
||||
"""
|
||||
|
||||
from mmgen.flags import ClassOpts, ClassFlags
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
test.modtest_d.ut_gen: key/address generation unit tests for the MMGen suite
|
||||
test.modtest_d.gen: key/address generation unit tests for the MMGen suite
|
||||
"""
|
||||
|
||||
from mmgen.color import blue
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
test.modtest_d.ut_indexed_dict: IndexedDict class unit test for the MMGen suite
|
||||
test.modtest_d.indexed_dict: IndexedDict class unit test for the MMGen suite
|
||||
"""
|
||||
|
||||
from mmgen.util import msg, msg_r, die
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
test.modtest_d.ut_lockable: unit test for the MMGen suite's Lockable class
|
||||
test.modtest_d.lockable: unit test for the MMGen suite's Lockable class
|
||||
"""
|
||||
|
||||
from decimal import Decimal
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue