test: clean up is node stopped #27895

pull dimitaracev wants to merge 1 commits into bitcoin:master from dimitaracev:test-cleanup-is-node-stopped changing 1 files +4 −9
  1. dimitaracev commented at 10:36 AM on June 15, 2023: contributor

    Fixes #27893

    Use f'strings for the message when asserting expected_ret_code and return_code. Change the expected_ret_code from an optional to have a default value of 0.

    cc MarcoFalke

  2. DrahtBot commented at 10:36 AM on June 15, 2023: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK stickies-v, MarcoFalke, brunoerg

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  3. DrahtBot added the label Tests on Jun 15, 2023
  4. in test/functional/test_framework/test_node.py:380 in e1d98be640 outdated
     377 | @@ -378,12 +378,9 @@ def is_node_stopped(self, expected_ret_code=None):
     378 |  
     379 |          # process has stopped. Assert that it didn't return an error code.
     380 |          # unless 'expected_ret_code' is provided.
    


    maflcko commented at 11:03 AM on June 15, 2023:

    You'll have to remove this line as well, because expected_ret_code is non-optional now


    dimitaracev commented at 11:19 AM on June 15, 2023:

    Done, thanks.

  5. dimitaracev force-pushed on Jun 15, 2023
  6. test: clean up is node stopped 6779e6ed7f
  7. in test/functional/test_framework/test_node.py:380 in 74395b247b outdated
     376 | @@ -377,13 +377,9 @@ def is_node_stopped(self, expected_ret_code=None):
     377 |              return False
     378 |  
     379 |          # process has stopped. Assert that it didn't return an error code.
     380 | -        # unless 'expected_ret_code' is provided.
     381 | -        if expected_ret_code is not None:
     382 | +        if expected_ret_code != 0:
    


    maflcko commented at 11:51 AM on June 15, 2023:

    Again, as mentioned previously, the expected_ret_code is always provided and will always have to be checked via the assert


    dimitaracev commented at 12:15 PM on June 15, 2023:

    Didn't notice that, done.

  8. dimitaracev force-pushed on Jun 15, 2023
  9. stickies-v approved
  10. stickies-v commented at 12:56 PM on June 15, 2023: contributor

    ACK 6779e6ed7f9ad455566dca8c5aa4ef13b6715cd5

  11. maflcko commented at 1:57 PM on June 15, 2023: member

    lgtm ACK 6779e6ed7f9ad455566dca8c5aa4ef13b6715cd5

  12. brunoerg approved
  13. brunoerg commented at 2:22 PM on June 15, 2023: contributor

    ACK 6779e6ed7f9ad455566dca8c5aa4ef13b6715cd5

  14. fanquake merged this on Jun 15, 2023
  15. fanquake closed this on Jun 15, 2023

  16. sidhujag referenced this in commit ff3370e0d6 on Jun 15, 2023
  17. bitcoin locked this on Jun 14, 2024

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-04-14 21:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me