Skip to content

Commit 01c76b9

Browse files
committed
Avoid running MultiPayotuERC20 tests unless testnet address(es) indicated
1 parent adb410e commit 01c76b9

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

.coveragerc

Lines changed: 0 additions & 2 deletions
This file was deleted.

README.org

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1915,7 +1915,6 @@ sets of 20 words is difficult, error-prone and time consuming.
19151915
: selfdestruc
19161916
: }
19171917

1918-
19191918
*** Client "Forwarder" Account Creation and Licensing
19201919

19211920
Guaranteeing that each client's payments always flow through to the designated tree of payees is

requirements-tests.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ build
33
cx_Freeze >=6.12
44
flake8
55
pyinstaller >=5.5
6-
pytest >=7.2.0,<8
7-
pytest-cov >=4.0.0,<5
6+
pytest >=7.4.2,<8
7+
pytest-cov >=4.1.0,<5
88
setuptools
99
wheel

slip39/invoice/multipayout_test.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,17 @@ def test_solcx_smoke():
5555
# Lets deduce the accounts to use in the Goerli Ethereum testnet. Look for environment variables:
5656
#
5757
# ..._XPRVKEY - Use this xprv... key to generate m/../0/0 (source) and m/../0/1-3 (destination) addresses
58-
# ...__SEED - Use this Seed (eg. BIP-39 Mnemonic Phrase, hex seed, ...) to generate the xprvkey
58+
# ..._SEED - Use this Seed (eg. BIP-39 Mnemonic Phrase, hex seed, ...) to generate the xprvkey
5959
#
6060
# If neither of those are found, use the 128-bit ffff...ffff Seed entropy. Once you provision an
61-
# xprvkey and derive the .../0/0 address, send some Goerli Ethereum testnet ETH to it.
61+
# xprvkey and derive the .../0/0 address, send some Goerli Ethereum testnet ETH (TGOR) to it.
6262
#
6363
# With no configuration, we'll end up using the 128-bit ffff...ffff Seed w/ no BIP-39 encoding as
6464
# our root HD Wallet seed.
6565
#
66+
# However, we will choose to *not* run the Multipayout tests, if no _SEED or _XPRVKEY is present,
67+
# since they require/use resources in the test networks...
68+
#
6669
web3_testers = []
6770

6871
# The Web3 tester doesn't seem to actually execute EVM contract code?
@@ -381,6 +384,8 @@ def test_create(address, nonce, expected_address):
381384
#
382385
# https://goerli.etherscan.io/address/0xcB5dc1F473A32f18dD4B834d8979fe914e249890
383386
#
387+
@pytest.mark.skipif( not goerli_xprvkey and not ganache_xprvkey,
388+
reason="Specify {GOERLI,GANACHE}_{SEED,XPRVKEY} to run MultiPayoutERC20 tests" )
384389
@pytest.mark.parametrize( "testnet, provider, chain_id, src, src_prvkey, destination", web3_testers )
385390
def test_multipayout_ERC20_web3_tester( testnet, provider, chain_id, src, src_prvkey, destination ):
386391
"""Use web3 tester
@@ -1001,6 +1006,8 @@ def tx_gas_cost( tx, receipt ):
10011006
assert w3.eth.get_balance( mc_cons_addr ) == 0
10021007

10031008

1009+
@pytest.mark.skipif( not goerli_xprvkey and not ganache_xprvkey,
1010+
reason="Specify {GOERLI,GANACHE}_{SEED,XPRVKEY} to run MultiPayoutERC20 tests" )
10041011
@pytest.mark.parametrize( "testnet, provider, chain_id, src, src_prvkey, destination", web3_testers )
10051012
def test_multipayout_api( testnet, provider, chain_id, src, src_prvkey, destination ):
10061013
"""Create (or reuse) a network of MultiPayoutERC20 contracts to process a payment through to
@@ -1089,6 +1096,8 @@ def test_multipayout_recover( testnet, provider, chain_id, src, src_prvkey, dest
10891096
print( f"Recovered MultiPayoutERC20 at {mp_r._address}" )
10901097

10911098

1099+
@pytest.mark.skipif( not goerli_xprvkey and not ganache_xprvkey,
1100+
reason="Specify {GOERLI,GANACHE}_{SEED,XPRVKEY} to run MultiPayoutERC20 tests" )
10921101
@pytest.mark.parametrize( "testnet, provider, chain_id, src, src_prvkey, destination", web3_testers )
10931102
def test_multipayout_deploy( testnet, provider, chain_id, src, src_prvkey, destination ):
10941103
"""Deploy a new MultiPayoutERC20 w/ random Fractional share allocations from 1/1 to 1/999.

0 commit comments

Comments
 (0)