Skip to content

test: replace random_bytes with random.randbytes - #28727

Merged
fanquake merged 1 commit into
bitcoin:masterfrom
nsvrn:tests_use_randbytes
Oct 29, 2023
Merged

fanquake merged 1 commit into
bitcoin:masterfrom
nsvrn:tests_use_randbytes

Conversation

@nsvrn

@nsvrn nsvrn commented Oct 25, 2023 •

Copy link
Copy Markdown

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.

@DrahtBot

DrahtBot commented Oct 25, 2023 •

Copy link
Copy Markdown
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.

@DrahtBot DrahtBot changed the title test: replace random_bytes with random.randbytes test: replace random_bytes with random.randbytes Oct 25, 2023
@DrahtBot DrahtBot added the Tests label Oct 25, 2023
Comment thread test/functional/feature_taproot.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to change this and remove the trailing ,?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no good reason really, will revert shortly

Comment thread test/functional/rpc_psbt.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

@maflcko

maflcko commented Oct 27, 2023

Copy link
Copy Markdown
Member

lgtm ACK fe3ac37

@BrandonOdiwuor BrandonOdiwuor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fe3ac37

@stickies-v stickies-v left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fe3ac37, 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)

@kristapsk kristapsk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK fe3ac37

@fanquake
fanquake merged commit f028470 into bitcoin:master Oct 29, 2023
@bitcoin bitcoin locked and limited conversation to collaborators Oct 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: Replace random_bytes() with random.randbytes()

7 participants