test: Make test cases separate functions#16293
Conversation
fab7c68 to
1111451
Compare
|
Concept ACK |
|
This seems like a great direction to go! There's probably more we can do in terms of managing state that's shared between test cases, but just explicitly spelling out which state is shared with self.foo, and unsharing other state, is going to remove 90% of the footgun potential right off the top. |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
promag
left a comment
There was a problem hiding this comment.
ACK 1111451d1, could squash last commit.
There was a problem hiding this comment.
nit, could nuke these "boxes".
1111451 to
fa11d69
Compare
|
Concept ACK, am updating #15687 to this as well after your review comment. Perhaps document where tests are order-dependent, if any. Will review. |
fa11d69 to
faf8318
Compare
|
Rebased due to conflict in adjacent line |
faf8318 test: Split fundrawtx test into subtests (MarcoFalke) fa6fba3 test: Make local symbols in run_test members (MarcoFalke) Pull request description: This prevents scope-leak of symbols that are supposed to be local to one test case. Top commit has no ACKs. Tree-SHA512: 9b2a4ca2cdd631ef915d2f7e6cd62375df9a0919448350aa6e5ae4aa8a8fe3ba53870f7a9a25a57736894b4e3a45e861018253ed2d57d9a64c2bb65fa270fad8
faf8318 test: Split fundrawtx test into subtests (MarcoFalke) fa6fba3 test: Make local symbols in run_test members (MarcoFalke) Pull request description: This prevents scope-leak of symbols that are supposed to be local to one test case. Top commit has no ACKs. Tree-SHA512: 9b2a4ca2cdd631ef915d2f7e6cd62375df9a0919448350aa6e5ae4aa8a8fe3ba53870f7a9a25a57736894b4e3a45e861018253ed2d57d9a64c2bb65fa270fad8
Summary: faf8318c55a6001270a6fc8ed2298767099bafba test: Split fundrawtx test into subtests (MarcoFalke) fa6fba3bc8013d7f813edd71f152d86eab907e4d test: Make local symbols in run_test members (MarcoFalke) Pull request description: This prevents scope-leak of symbols that are supposed to be local to one test case. Top commit has no ACKs. Backport of Core [[bitcoin/bitcoin#16293 | PR16293]] Test Plan: `test_runner.py rpc_fundrawtransaction` Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Subscribers: majcosta Differential Revision: https://reviews.bitcoinabc.org/D7688
This prevents scope-leak of symbols that are supposed to be local to one test case.