Skip to content

Commit

Permalink
Raise unittest deltas for unstable testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryp Toon committed Sep 14, 2024
1 parent d11fb50 commit 11e598c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tests/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,9 +614,12 @@ def test_service_blockcount(self):
srv = ServiceTest(min_providers=3, cache_uri='', network=nw, exclude_providers=['bitgo', 'bitaps'])
srv.blockcount()
n_blocks = None
delta = 200
if nw == 'testnet':
delta = 2500
for provider in srv.results:
if n_blocks is not None:
self.assertAlmostEqual(srv.results[provider], n_blocks, delta=200,
self.assertAlmostEqual(srv.results[provider], n_blocks, delta=delta,
msg="Network %s, provider %s value %d != %d" %
(nw, provider, srv.results[provider], n_blocks))
n_blocks = srv.results[provider]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_wallets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2388,7 +2388,7 @@ def test_wallet_anti_fee_sniping(self):
w.utxo_add(w.get_key().address, 1234567, os.urandom(32).hex(), 1)
t = w.send_to('tb1qrjtz22q59e76mhumy0p586cqukatw5vcd0xvvz', 123456)
block_height = Service(network='testnet', cache_uri='').blockcount()
self.assertAlmostEqual(t.locktime, block_height+1, delta=3)
self.assertAlmostEqual(t.locktime, block_height+1, delta=5)

w2 = wallet_create_or_open('antifeesnipingtestwallet2', network='testnet', anti_fee_sniping=True,
db_uri=self.database_uri)
Expand Down

0 comments on commit 11e598c

Please sign in to comment.