[tests] Remove 'account' API from wallet functional tests #13075

pull jnewbery wants to merge 1 commits into bitcoin:master from jnewbery:remove_functional_tests_accounts changing 8 files +78 −126
  1. jnewbery commented at 8:06 PM on April 25, 2018: member

    Next step in #12952. Removes all usage of the 'account' API from the wallet functional tests, except:

    • rpc_deprecated.py (which specifically tests the -deprecatedrpc=accounts command line argument is working properly).
    • wallet_labels.py (which tests that both the 'label' and 'account' APIs work in V0.17).

    'account' API usage for both of those tests can be removed once V0.17 has been branched.

    Also excluded is:

    • wallet_importprunedfunds.py (which fails due to a bitcoind OOM error)
  2. jnewbery force-pushed on Apr 25, 2018
  3. jnewbery cross-referenced this on Apr 25, 2018 from issue Remove wallet 'account' API by jnewbery
  4. laanwj commented at 8:26 AM on April 26, 2018: member

    Nice! Concept ACK.

  5. jonasschnelli commented at 8:29 AM on April 26, 2018: contributor

    Concept ACK. I think combining some commits (especially the flake8 fixes) would help in review.

  6. laanwj commented at 2:01 PM on May 1, 2018: member

    This currently fails Travis due to an OOM issue exposed by wallet_importprunedfunds.py

    Ref: this issue is tracked in #13078, and so this PR depends on that being fixed

  7. laanwj added the label Tests on May 1, 2018
  8. jnewbery renamed this:
    Remove 'account' API from wallet functional tests
    [Don't merge yet] Remove 'account' API from wallet functional tests
    on May 1, 2018
  9. jnewbery force-pushed on May 1, 2018
  10. jnewbery cross-referenced this on May 1, 2018 from issue [tests] Fix flake8 warnings in several wallet functional tests by jnewbery
  11. jnewbery commented at 3:13 PM on May 1, 2018: member

    I've squashed all the flake8 fixes into a single commit as requested by @jonasschnelli , and opened a PR for just those fixes at #13136.

  12. jnewbery force-pushed on May 1, 2018
  13. MarcoFalke referenced this in commit baf6b4e3f9 on May 1, 2018
  14. jnewbery force-pushed on May 1, 2018
  15. jnewbery force-pushed on May 1, 2018
  16. jnewbery renamed this:
    [Don't merge yet] Remove 'account' API from wallet functional tests
    [tests] Remove 'account' API from wallet functional tests
    on May 1, 2018
  17. jnewbery commented at 7:24 PM on May 1, 2018: member
    • Rebased on master (to pick up the flake8 fixes)
    • Moved the wallet_importprunedfunds.py change to a separate PR (since it exposes a bitcoind OOM error)
    • Squashed all remaining commits.

    Should be a fairly straightforward review.

  18. jnewbery cross-referenced this on May 1, 2018 from issue [tests] Remove accounts from wallet_importprunedfunds.py by jnewbery
  19. MarcoFalke commented at 8:34 PM on May 1, 2018: member

    tests fail on travis

  20. jnewbery force-pushed on May 1, 2018
  21. jnewbery commented at 9:01 PM on May 1, 2018: member

    Thanks @MarcoFalke . Should now be fixed.

  22. sipa commented at 10:07 PM on May 1, 2018: member

    Concept ACK

  23. in test/functional/wallet_keypool_topup.py:28 in 6b7a4ea7e9 outdated
      24 | @@ -25,7 +25,7 @@ class KeypoolRestoreTest(BitcoinTestFramework):
      25 |      def set_test_params(self):
      26 |          self.setup_clean_chain = True
      27 |          self.num_nodes = 2
      28 | -        self.extra_args = [['-deprecatedrpc=accounts'], ['-deprecatedrpc=accounts', '-keypool=100', '-keypoolmin=20']]
      29 | +        self.extra_args = [[], ['-keypool=100', '-keypoolmin=20']]
    


    MarcoFalke commented at 11:25 PM on May 1, 2018:

    What does keypoolmin do?


    MarcoFalke commented at 12:05 AM on May 2, 2018:

    Looks like this was added in d34957e17e8c9740104533aaf4a896e93548c87e and it is fine to just remove.


    jnewbery commented at 9:53 PM on May 2, 2018:

    removed

  24. in test/functional/wallet_listtransactions.py:98 in 6b7a4ea7e9 outdated
     100 | -        assert(len(self.nodes[0].listtransactions("watchonly", 100, 0, False)) == 0)
     101 | -        assert_array_result(self.nodes[0].listtransactions("watchonly", 100, 0, True),
     102 | -                            {"category": "receive", "amount": Decimal("0.1")},
     103 | -                            {"txid": txid, "account": "watchonly"})
     104 | +        assert not [tx for tx in self.nodes[0].listtransactions("*", 100, 0, False) if "label" in tx and tx["label"] == "watchonly"]
     105 | +        txs = [tx for tx in self.nodes[0].listtransactions("*", 100, 0, True) if "label" in tx and tx['label'] == 'watchonly']
    


    MarcoFalke commented at 11:28 PM on May 1, 2018:

    nit: Could use named args for those True and False?


    jnewbery commented at 9:54 PM on May 2, 2018:

    You can't mix positional and named args, so I've named them all.

  25. MarcoFalke commented at 11:32 PM on May 1, 2018: member

    utACK 6b7a4ea7e9929d0ad65c7caf822f44ab6c01a475. Some style nits/questions.

  26. meshcollider commented at 9:14 AM on May 2, 2018: contributor

    Concept ACK

  27. [tests] Remove 'account' API from wallet functional tests
    Removes usage of account API from the following functional tests:
    
    - wallet_listreceivedby.py
    - wallet_basic.py
    - wallet_keypool_topup.py
    - wallet_txn_clone.py
    - wallet_listsinceblock.py
    - wallet_import_rescan.py
    - wallet_listtransactions.py
    - wallet_txn_doublespend.py
    5d536619ab
  28. jnewbery force-pushed on May 2, 2018
  29. jnewbery commented at 9:55 PM on May 2, 2018: member

    Thanks for the reviews. I've addressed @MarcoFalke 's comments.

    → git diff 6b7a4ea7e9929d0ad65c7caf822f44ab6c01a475 5d536619abda745c298fd827a856df775f223241
    diff --git a/test/functional/wallet_keypool_topup.py b/test/functional/wallet_keypool_topup.py
    index 30a0c9a76..d657dc30c 100755
    --- a/test/functional/wallet_keypool_topup.py
    +++ b/test/functional/wallet_keypool_topup.py
    @@ -25,7 +25,7 @@ class KeypoolRestoreTest(BitcoinTestFramework):
         def set_test_params(self):
             self.setup_clean_chain = True
             self.num_nodes = 2
    -        self.extra_args = [[], ['-keypool=100', '-keypoolmin=20']]
    +        self.extra_args = [[], ['-keypool=100']]
     
         def run_test(self):
             wallet_path = os.path.join(self.nodes[1].datadir, "regtest", "wallets", "wallet.dat")
    diff --git a/test/functional/wallet_listtransactions.py b/test/functional/wallet_listtransactions.py
    index 3de65b9b5..7cf2e456c 100755
    --- a/test/functional/wallet_listtransactions.py
    +++ b/test/functional/wallet_listtransactions.py
    @@ -94,8 +94,8 @@ class ListTransactionsTest(BitcoinTestFramework):
             txid = self.nodes[1].sendtoaddress(multisig["address"], 0.1)
             self.nodes[1].generate(1)
             self.sync_all()
    -        assert not [tx for tx in self.nodes[0].listtransactions("*", 100, 0, False) if "label" in tx and tx["label"] == "watchonly"]
    -        txs = [tx for tx in self.nodes[0].listtransactions("*", 100, 0, True) if "label" in tx and tx['label'] == 'watchonly']
    +        assert not [tx for tx in self.nodes[0].listtransactions(dummy="*", count=100, skip=0, include_watchonly=False) if "label" in tx and tx["label"] == "watchonly"]
    +        txs = [tx for tx in self.nodes[0].listtransactions(dummy="*", count=100, skip=0, include_watchonly=True) if "label" in tx and tx['label'] == 'watchonly']
             assert_array_result(txs, {"category": "receive", "amount": Decimal("0.1")}, {"txid": txid})
     
             self.run_rbf_opt_in_test()
    
  30. MarcoFalke merged this on May 10, 2018
  31. MarcoFalke closed this on May 10, 2018

  32. MarcoFalke referenced this in commit cb9bbf7772 on May 10, 2018
  33. Bushstar cross-referenced this on May 13, 2018 from issue commits from bitcoin/master by Bushstar
  34. jnewbery deleted the branch on May 14, 2018
  35. MarcoFalke referenced this in commit 8803c9132a on Jul 14, 2018
  36. ryanofsky referenced this in commit 8fcb765084 on Oct 6, 2018
  37. ryanofsky cross-referenced this on Oct 6, 2018 from issue [wallet] Restore ability to list incoming transactions by label by ryanofsky
  38. jnewbery referenced this in commit c8d1f1513f on Oct 9, 2018
  39. jnewbery cross-referenced this on Oct 9, 2018 from issue [wallet] Backport(0.17): Restore ability to list incoming transactions by label by jnewbery
  40. ryanofsky referenced this in commit fa7fae5c36 on Oct 10, 2018
  41. ryanofsky referenced this in commit 4deba4ced9 on Oct 10, 2018
  42. jnewbery referenced this in commit 89306ab0df on Oct 10, 2018
  43. ryanofsky referenced this in commit 7cbe74f152 on Oct 15, 2018
  44. laanwj referenced this in commit 5150accdd2 on Nov 10, 2018
  45. ryanofsky referenced this in commit b6ccb77270 on Nov 12, 2018
  46. ryanofsky referenced this in commit 3f05bcbf5d on Nov 13, 2018
  47. ryanofsky referenced this in commit 65b740f92b on Nov 13, 2018
  48. MarcoFalke referenced this in commit e74649e951 on Nov 14, 2018
  49. JeremyRubin referenced this in commit 19581b0f3f on Nov 24, 2018
  50. HashUnlimited referenced this in commit 2d9f1046e7 on Nov 26, 2018
  51. Fuzzbawls cross-referenced this on Jun 25, 2020 from issue [Tracking] Remove wallet 'account' API by Fuzzbawls
  52. PastaPastaPasta referenced this in commit ffe575a9fd on Jul 19, 2020
  53. PastaPastaPasta referenced this in commit 5a1ca94063 on Jul 24, 2020
  54. PastaPastaPasta referenced this in commit f8fb77abc5 on Jul 27, 2020
  55. UdjinM6 referenced this in commit 24cc9b89a2 on Jul 27, 2020
  56. UdjinM6 referenced this in commit 72a56e3118 on Jul 27, 2020
  57. xdustinface referenced this in commit 2bdbc5b70f on Dec 18, 2020
  58. xdustinface referenced this in commit d43ffc6fba on Dec 18, 2020
  59. xdustinface referenced this in commit 7f9343446a on Dec 18, 2020
  60. xdustinface cross-referenced this on Dec 18, 2020 from issue backport: Deprecate accounts by xdustinface
  61. xdustinface referenced this in commit 02e4b5b5b5 on Dec 22, 2020
  62. xdustinface referenced this in commit de7c6514a3 on Dec 22, 2020
  63. xdustinface referenced this in commit 42a98b0bc8 on Dec 22, 2020
  64. xdustinface referenced this in commit 96d306324f on Dec 22, 2020
  65. UdjinM6 referenced this in commit 3d55b81198 on May 21, 2021
  66. UdjinM6 referenced this in commit f1ec546b35 on May 25, 2021
  67. TheArbitrator referenced this in commit 3a58e04762 on Jun 4, 2021
  68. PastaPastaPasta referenced this in commit 3dad55fc4c on Jun 27, 2021
  69. PastaPastaPasta referenced this in commit 9ce89a7114 on Jun 28, 2021
  70. PastaPastaPasta referenced this in commit afd1189c69 on Jun 28, 2021
  71. PastaPastaPasta referenced this in commit d9eb5242e1 on Jun 28, 2021
  72. PastaPastaPasta referenced this in commit 526b4ede3a on Jun 28, 2021
  73. PastaPastaPasta referenced this in commit 15a65ab407 on Jun 29, 2021
  74. UdjinM6 referenced this in commit b25d608471 on Aug 7, 2021
  75. bitcoin locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:55 UTC