/test/functional/rpc_help.py checks for the zmq-category even while zmq may be disabled (in /test/config.ini) , I have added a check function to test_framework.py that can be used whether to determine to include zmq in a test or not.
Test rpc_help.py failed: Check whether ZMQ is enabled or not. #14122
pull Kvaciral wants to merge 1 commits into bitcoin:master from Kvaciral:check_zmq_enabled changing 2 files +15 −4-
Kvaciral commented at 9:32 PM on August 31, 2018: contributor
- laanwj added the label Tests on Aug 31, 2018
-
in test/functional/rpc_help.py:7 in 14e7176873 outdated
3 | @@ -4,7 +4,7 @@ 4 | # file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 | """Test RPC help output.""" 6 | 7 | -from test_framework.test_framework import BitcoinTestFramework 8 | +from test_framework.test_framework import (BitcoinTestFramework, is_zmq_enabled)
promag commented at 10:45 PM on August 31, 2018:nit, drop
( )?
Kvaciral commented at 11:26 PM on August 31, 2018:Oops, of course!!
in test/functional/rpc_help.py:31 in 14e7176873 outdated
24 | @@ -25,7 +25,13 @@ def run_test(self): 25 | 26 | # command titles 27 | titles = [line[3:-3] for line in node.help().splitlines() if line.startswith('==')] 28 | - assert_equal(titles, ['Blockchain', 'Control', 'Generating', 'Mining', 'Network', 'Rawtransactions', 'Util', 'Wallet', 'Zmq']) 29 | + 30 | + components = ['Blockchain', 'Control', 'Generating', 'Mining', 'Network', 'Rawtransactions', 'Util', 'Wallet'] 31 | + 32 | + if is_zmq_enabled(self):
promag commented at 10:50 PM on August 31, 2018:nit, my preference is
if is_zmq_enabled(self): assert_equal(titles, ['Blockchain', 'Control', 'Generating', 'Mining', 'Network', 'Rawtransactions', 'Util', 'Wallet', 'Zmq']) else: assert_equal(titles, ['Blockchain', 'Control', 'Generating', 'Mining', 'Network', 'Rawtransactions', 'Util', 'Wallet'])
Kvaciral commented at 10:59 PM on August 31, 2018:I disagree, my code is more flexible..
laanwj commented at 11:03 PM on August 31, 2018:there might be more optional categories in the future, which would result in a combination blow-up (say, if we ever make the functional tests run without wallet). I prefer adding them one by one as it is now.
promag commented at 11:16 PM on August 31, 2018:Makes sense!
promag commented at 10:52 PM on August 31, 2018: memberThanks @Kvaciral, this was on my TODO after @MarcoFalke #14020#pullrequestreview-150958484.
utACK 14e7176, mind some nits.
Test rpc_help.py failed: Check whether ZMQ is enabled or not. 8dfc2f30delaanwj commented at 6:19 AM on September 1, 2018: memberACK 8dfc2f30dea6bde0f74d23691377f248966011ab
ken2812221 commented at 6:23 AM on September 1, 2018: contributorutACK 8dfc2f3
laanwj merged this on Sep 1, 2018laanwj closed this on Sep 1, 2018laanwj referenced this in commit 2070a545e2 on Sep 1, 2018Kvaciral deleted the branch on Sep 1, 2018MarcoFalke referenced this in commit 286eab50ad on Oct 4, 2018MarcoFalke referenced this in commit 8bc1badada on Oct 25, 2018toxeus referenced this in commit d44ff3e75b on Nov 28, 2018PastaPastaPasta referenced this in commit 75abadbd88 on Jul 19, 2021PastaPastaPasta referenced this in commit 42e7ed79c6 on Jul 19, 2021PastaPastaPasta referenced this in commit c397d658e3 on Jul 19, 2021PastaPastaPasta referenced this in commit 0b76f1495a on Jul 19, 2021MarcoFalke locked this on Sep 8, 2021ContributorsLabels
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-28 06:15 UTC
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-28 06:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me