Page MenuHomePhabricator

test: re-enable CLI test support by using EncodeDecimal in json.dumps()
ClosedPublic

Authored by PiRK on Nov 8 2020, 09:55.

Details

Summary

As mentioned in
https://github.com/bitcoin/bitcoin/pull/17675#issuecomment-563188648

This makes more functional tests compatible with option --usecli, by fixing the JSON serialization error for Decimal objects. This was the most common error preventing tests to run with --usecli in D8316.

I found two more tests that are fixed by this change, that were not activated in the original PR: wallet_address_types.py and feature_csv_activation.py

Before:

$ ninja && test/functional/test_runner.py --usecli 2>&1 | cut -f2 -d'|' |     grep -E ' (Passed|Skipped|Failed|) *$' | sort | uniq -c
     97  ✓ Passed  
     49  ○ Skipped 

After:

$ ninja && test/functional/test_runner.py --usecli 2>&1 | cut -f2 -d'|' |     grep -E ' (Passed|Skipped|Failed|) *$' | sort | uniq -c
    110  ✓ Passed  
     36  ○ Skipped 

This is a backport of Core PR17705
Depends on D8317

Test Plan

test/functional/test_runner.py --usecli

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Nov 8 2020, 09:55

enable two more tests that now support --usecli:

  • feature_csv_activation.py
  • wallet_address_types.py
This revision is now accepted and ready to land.Nov 8 2020, 15:12