Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qa: Use named args in validation acceptance tests #14101

Merged
merged 3 commits into from
Aug 31, 2018

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Aug 29, 2018

It is confusing to use a list of arguments such as False, False, 16, ... where it is unclear what each of them means.

Run some scripted diffs to put meaning to them.

MarcoFalke added 2 commits August 29, 2018 12:52
-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended -e 's/(test_witness_block|test_transaction_acceptance)\((self\.nodes\[.\])\.rpc/\1(\2/g' test/functional/p2p_segwit.py
-END VERIFY SCRIPT-
-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended -e "s/sync_blocks\((.*?), (True|False), (1.?), /sync_blocks(\1, success=\2, reject_code=\3, reject_reason=/g" ./test/functional/feature_block.py
-END VERIFY SCRIPT-
@maflcko maflcko added the Tests label Aug 29, 2018
@maflcko maflcko force-pushed the Mf1808-qaNamedArgsAcceptance branch from fa910fd to fa1c0be Compare August 29, 2018 17:03
@maflcko maflcko force-pushed the Mf1808-qaNamedArgsAcceptance branch from fa1c0be to fa782a3 Compare August 29, 2018 17:06
@DrahtBot
Copy link
Contributor

Note to reviewers: This pull request conflicts with the following ones:

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.

@promag
Copy link
Member

promag commented Aug 30, 2018

utACK fa782a3.

nit, could rename the following rpc arguments to node:

def test_transaction_acceptance(rpc, p2p, tx, with_witness, accepted, reason=None):

def test_witness_block(rpc, p2p, block, accepted, with_witness=True, reason=None):

@practicalswift
Copy link
Contributor

Concept ACK

Clearly improves code readability

@laanwj
Copy link
Member

laanwj commented Aug 30, 2018

utACK fa782a3

@laanwj laanwj merged commit fa782a3 into bitcoin:master Aug 31, 2018
laanwj added a commit that referenced this pull request Aug 31, 2018
fa782a3 qa: Use named args in some tests (MarcoFalke)
b4d3309 scripted-diff: Use named arguments in feature_block (MarcoFalke)
749ba35 scripted-diff: Pass node into p2p_segwit acceptance tests (MarcoFalke)

Pull request description:

  It is confusing to use a list of arguments such as `False, False, 16, ...` where it is unclear what each of them means.

  Run some scripted diffs to put meaning to them.

Tree-SHA512: d768df2375ea3c77145ebb1bf4c2d690581a379031449ded7ae160022d975eb13890aa8c6a44a5eebda8791cb2910a599326e431af76ed9e60afe1d182ada65c
@maflcko maflcko deleted the Mf1808-qaNamedArgsAcceptance branch August 31, 2018 12:36
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Oct 25, 2018
-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended -e 's/(test_witness_block|test_transaction_acceptance)\((self\.nodes\[.\])\.rpc/\1(\2/g' test/functional/p2p_segwit.py
-END VERIFY SCRIPT-

Github-Pull: bitcoin#14101
Rebased-From: 749ba35
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Oct 25, 2018
-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended -e "s/sync_blocks\((.*?), (True|False), (1.?), /sync_blocks(\1, success=\2, reject_code=\3, reject_reason=/g" ./test/functional/feature_block.py
-END VERIFY SCRIPT-

Github-Pull: bitcoin#14101
Rebased-From: b4d3309
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Oct 25, 2018
toxeus pushed a commit to toxeus/bitcoin that referenced this pull request Nov 28, 2018
-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended -e 's/(test_witness_block|test_transaction_acceptance)\((self\.nodes\[.\])\.rpc/\1(\2/g' test/functional/p2p_segwit.py
-END VERIFY SCRIPT-

Github-Pull: bitcoin#14101
Rebased-From: 749ba35
toxeus pushed a commit to toxeus/bitcoin that referenced this pull request Nov 28, 2018
-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended -e "s/sync_blocks\((.*?), (True|False), (1.?), /sync_blocks(\1, success=\2, reject_code=\3, reject_reason=/g" ./test/functional/feature_block.py
-END VERIFY SCRIPT-

Github-Pull: bitcoin#14101
Rebased-From: b4d3309
toxeus pushed a commit to toxeus/bitcoin that referenced this pull request Nov 28, 2018
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Jun 30, 2021
fa782a3 qa: Use named args in some tests (MarcoFalke)
b4d3309 scripted-diff: Use named arguments in feature_block (MarcoFalke)
749ba35 scripted-diff: Pass node into p2p_segwit acceptance tests (MarcoFalke)

Pull request description:

  It is confusing to use a list of arguments such as `False, False, 16, ...` where it is unclear what each of them means.

  Run some scripted diffs to put meaning to them.

Tree-SHA512: d768df2375ea3c77145ebb1bf4c2d690581a379031449ded7ae160022d975eb13890aa8c6a44a5eebda8791cb2910a599326e431af76ed9e60afe1d182ada65c

# Conflicts:
#	test/functional/feature_block.py
#	test/functional/mining_basic.py
#	test/functional/p2p_segwit.py
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Jul 2, 2021
fa782a3 qa: Use named args in some tests (MarcoFalke)
b4d3309 scripted-diff: Use named arguments in feature_block (MarcoFalke)
749ba35 scripted-diff: Pass node into p2p_segwit acceptance tests (MarcoFalke)

Pull request description:

  It is confusing to use a list of arguments such as `False, False, 16, ...` where it is unclear what each of them means.

  Run some scripted diffs to put meaning to them.

Tree-SHA512: d768df2375ea3c77145ebb1bf4c2d690581a379031449ded7ae160022d975eb13890aa8c6a44a5eebda8791cb2910a599326e431af76ed9e60afe1d182ada65c

# Conflicts:
#	test/functional/feature_block.py
#	test/functional/mining_basic.py
#	test/functional/p2p_segwit.py
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request Jul 2, 2021
fa782a3 qa: Use named args in some tests (MarcoFalke)
b4d3309 scripted-diff: Use named arguments in feature_block (MarcoFalke)
749ba35 scripted-diff: Pass node into p2p_segwit acceptance tests (MarcoFalke)

Pull request description:

  It is confusing to use a list of arguments such as `False, False, 16, ...` where it is unclear what each of them means.

  Run some scripted diffs to put meaning to them.

Tree-SHA512: d768df2375ea3c77145ebb1bf4c2d690581a379031449ded7ae160022d975eb13890aa8c6a44a5eebda8791cb2910a599326e431af76ed9e60afe1d182ada65c

# Conflicts:
#	test/functional/feature_block.py
#	test/functional/mining_basic.py
#	test/functional/p2p_segwit.py
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
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.

None yet

5 participants