Commit graph

85 commits

Author SHA1 Message Date
f840069ecb
update copyright dates 2026-02-11 13:02:12 +00:00
587397f9c1
test suite: use match statement where practicable (2 files) 2025-09-23 09:20:54 +00:00
1ecde8880b
minor cleanups (9 files) 2025-09-23 09:20:53 +00:00
c2d7a90b68
test/objtest_d: remove prefixes on test files 2025-03-29 09:30:15 +00:00
e54f039690
update copyright dates 2025-02-16 14:42:27 +00:00
926716090a
test suite: rename some directories
- cmdtest_py_d -> cmdtest_d
- objtest_py_d -> objtest_d
- objattrtest_py_d -> objattrtest_d
2024-10-18 10:32:15 +00:00
74bc49f973
whitespace: tests, top level 2024-10-18 10:32:12 +00:00
5150ca586b
update file header 2024-10-18 10:32:06 +00:00
66521a07f2
update --longhelp text 2024-10-08 12:55:58 +00:00
3b4e9ebc1e
pylint: test suite, examples 2024-09-20 09:36:06 +00:00
8e46932475
update copyright dates 2024-01-19 11:05:10 +00:00
a7e816f98e
test suite: make test scripts importable as modules 2023-10-13 09:51:14 +00:00
6a21044127
test suite: improve initialization of sys.path and repo_root 2023-10-13 09:51:14 +00:00
055759f02a
pylint integration: minor compatibility changes 2023-10-13 09:51:13 +00:00
7e8f3ab7b5
pylint (test suite) - bugfixes 2023-10-11 12:58:53 +00:00
2076c0308b
pylint (test suite) - various cleanups 2023-10-11 12:58:53 +00:00
033822f565
pylint (test suite) - use "is" for bool,None,type equality 2023-10-11 12:58:52 +00:00
07d2d6dcb9
pylint (test suite) - type comparison with isinstance() 2023-10-11 12:58:51 +00:00
7b32c412d5
pylint (test suite) - imports 2023-10-11 12:58:51 +00:00
01430166e5
whitespace, comments, docstrings (test suite) 2023-10-11 12:58:51 +00:00
f626fc2e05
missing import fixes throughout 2023-10-03 14:27:57 +00:00
b98d5312ec
objtest.py: cleanups, import cleanups 2023-10-03 14:27:55 +00:00
6c249dec5b
load dev tools only when MMGEN_DEVTOOLS env var is set 2023-09-30 15:36:41 +00:00
31a6e62a24
test suite: sys.path, overlay, PYTHONPATH cleanups 2023-09-26 10:23:40 +00:00
0cc96af152
test suite: PYTHONPATH and other env var fixes 2023-09-25 13:25:00 +00:00
9e1935ad19
opts.init() -> Config() 2023-04-04 16:04:10 +00:00
c7adb56e38
Config API, Part I
This patch eliminates the global configuration variables `opt` and `g`, making
all functions and class instances locally configurable.  Configuration data is
passed to functions and constructors via the `cfg` parameter and made available
to methods in `self.cfg`.

Local configuration free from dependence on the command line will enable the
creation of multiple, independently configured instances of MMGen’s data
objects within a single process.

Potential applications include testing (tracking wallets configured to interact
with spawned processes, for example) and the use of MMGen as a library for
other projects.

This patch completes most of the work required to enable the API.  The full
implementation will appear in a forthcoming commit.
2023-03-28 18:14:37 +00:00
1aeefd64ae
update copyright dates 2023-01-03 10:36:07 +00:00
20f4b12832
module docstring cleanups [134 files] 2022-11-14 09:54:07 +00:00
6da4063544
tracking wallet views: move module loading to tw.view 2022-11-12 13:35:50 +00:00
5948bd4106
module rename: tw.common -> tw.view 2022-11-12 13:34:40 +00:00
9a1ea34309
initialize developer tools via builtins; add test 2022-10-20 18:14:15 +00:00
0fef35f567
move tracking wallet modules to tw and base_proto/{name}/tw 2022-02-10 12:51:41 +00:00
59bffb59b2
CoinProtocol.Base: skip loading of .amt module via 'need_amt=False' 2022-01-29 11:25:03 +00:00
307ccfa87d
remove altcoins.eth.obj module
- ETHAmt -> mmgen.amt
- ETHNonce -> mmgen.obj
2022-01-27 11:08:06 +00:00
7cb44abd78
minor fixes and cleanups 2022-01-15 14:00:11 +00:00
16d7e73fe1
move IPPort to rpc.py 2022-01-15 14:00:09 +00:00
545406aea4
addr.py: move PubKey and PrivKey to key.py 2022-01-15 14:00:08 +00:00
e0352568db
addr.py: move AddrList and related classes to addrlist.py
- also move PasswordList to passwdlist.py
- add a minimal unit test

Testing:

    $ test/unit_tests.py addrlist
2022-01-15 14:00:08 +00:00
d669229da0
move CoinAmt and related classes to amt.py 2022-01-15 14:00:06 +00:00
ff450b0ec5
seed.py: move seedsplit related classes to seedsplit.py 2022-01-15 14:00:05 +00:00
1a896d9af9
update copyright dates 2022-01-04 19:51:22 +00:00
554670b713
overlay_setup(): use passed value of repo_root 2021-10-05 11:57:34 +00:00
08fc25d863
deterministic testing
Goal: for each test run to produce reproducible output, allowing us to check
for possible stochastic behavior in the scripts, as well as output-related
regressions (for example, garbage or improperly formatted output produced by a
bad format string) that might not be detected by the test scripts.

In practice, bugginess of the pexpect module and the non-deterministic behavior
of Bitcoin Core’s regtest implementation preclude completely identical output
from test run to test run, but the differences are small enough to result in an
easily reviewable diff.

Enable this feature by setting the MMGEN_TEST_SUITE_DETERMINISTIC environment
variable or running test/test-release.sh with the -D switch.

Examples:

    $ script -c 'test/test-release.sh -FDv quick' -O run1
    $ script -c 'test/test-release.sh -FDv quick' -O run2
    # (optionally remove control characters from output files)
    $ diff -u run1 run2 > diff

    $ export MMGEN_TEST_SUITE_DETERMINISTIC=1
    $ script -c 'test/test.py -ne main' -O run1
    $ script -c 'test/test.py -ne main' -O run2
    # (optionally remove control characters from output files)
    $ diff -u run1 run2 > diff
2021-10-03 17:40:03 +00:00
96a250b51d
test suite: run scripts from overlay tree
Rationale of this commit: to relocate some ugly test-related code from the MMGen
package tree to the test tree, as well as to enable deterministic testing
(implemented in the next commit).

The overlay tree is a symlinked mirror of the MMGen package dir with a few
monkey-patched modules.

The monkey-patching is conditional, so the modules are certain to get tested in
their unpatched state as well.
2021-10-03 17:40:02 +00:00
6692a43d59
f-strings, whitespace (test files) [44 files patched] 2021-09-29 21:17:57 +00:00
fcc75b65e5
minor fixes and cleanups 2021-09-01 16:56:34 +00:00
cb7f38370b
Update copyright dates 2021-02-19 20:09:06 +03:00
d2055c93da
test.py: allow color for some test groups; minor fixes, cleanups 2020-06-03 12:29:50 +00:00
c27c464a87
obj.py: InitErrors: allow selected exceptions to be passed through 2020-06-02 19:33:15 +00:00