test: replace random_bytes with random.randbytes #28727

pull nsvrn wants to merge 1 commits into bitcoin:master from nsvrn:tests_use_randbytes changing 5 files +35 −44
  1. nsvrn commented at 4:50 am on October 25, 2023: contributor

    With Python upgraded to 3.9 replaced the random_bytes function in util of functional tests and replaced it’s usage with random.randbytes.

    Closes #28720.

  2. DrahtBot commented at 4:50 am on October 25, 2023: contributor

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

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko, BrandonOdiwuor, stickies-v, kristapsk

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #28528 (test: Use test framework utils in functional tests by osagie98)
    • #28408 (datacarriersize: Match more datacarrying by luke-jr)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  3. DrahtBot renamed this:
    test: replace random_bytes with random.randbytes
    test: replace random_bytes with random.randbytes
    on Oct 25, 2023
  4. DrahtBot added the label Tests on Oct 25, 2023
  5. in test/functional/feature_taproot.py:97 in e517a37168 outdated
    93@@ -94,8 +94,7 @@
    94 from test_framework.test_framework import BitcoinTestFramework
    95 from test_framework.util import (
    96     assert_raises_rpc_error,
    97-    assert_equal,
    98-    random_bytes,
    99+    assert_equal
    


    maflcko commented at 5:31 am on October 25, 2023:
    Any reason to change this and remove the trailing ,?

    nsvrn commented at 12:40 pm on October 25, 2023:
    no good reason really, will revert shortly
  6. in test/functional/rpc_psbt.py:43 in e517a37168 outdated
    39@@ -39,8 +40,7 @@
    40     assert_greater_than_or_equal,
    41     assert_raises_rpc_error,
    42     find_output,
    43-    find_vout_for_address,
    44-    random_bytes,
    45+    find_vout_for_address
    


    maflcko commented at 5:32 am on October 25, 2023:
    Same
  7. DrahtBot added the label CI failed on Oct 25, 2023
  8. DrahtBot removed the label CI failed on Oct 25, 2023
  9. test: replace random_bytes with randbytes #28720 fe3ac3700d
  10. nsvrn force-pushed on Oct 25, 2023
  11. maflcko commented at 11:17 am on October 27, 2023: member
    lgtm ACK fe3ac3700d31a6329056fee983d91dd8e4c987c1
  12. BrandonOdiwuor approved
  13. BrandonOdiwuor commented at 11:30 am on October 27, 2023: contributor
    ACK fe3ac3700d31a6329056fee983d91dd8e4c987c1
  14. stickies-v approved
  15. stickies-v commented at 12:41 pm on October 27, 2023: contributor

    ACK fe3ac3700d31a6329056fee983d91dd8e4c987c1, thanks for picking this up

    nit for future reference: no need to mention the issue number (28720) in the commit message, it causes a bit of github spam and this change is self-explanatory. It can be good practice for more complex commits to point the reader towards additional resources (but even then, commits are ideally self-explanatory)

  16. kristapsk approved
  17. kristapsk commented at 2:32 pm on October 27, 2023: contributor
    utACK fe3ac3700d31a6329056fee983d91dd8e4c987c1
  18. fanquake merged this on Oct 29, 2023
  19. fanquake closed this on Oct 29, 2023

  20. bitcoin locked this on Oct 29, 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: 2024-11-21 21:12 UTC

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