This will warn on typos on tests provided manually on the command line.
Also, this comes with the new feature that the same test can be specified multiple times on the command line.
This will warn on typos on tests provided manually on the command line.
Also, this comes with the new feature that the same test can be specified multiple times on the command line.
172 | @@ -173,7 +173,7 @@ def main(): 173 | args, unknown_args = parser.parse_known_args() 174 | 175 | # Create a set to store arguments and create the passon string 176 | - tests = set(arg for arg in unknown_args if arg[:2] != "--") 177 | + tests = [arg for arg in unknown_args if arg[:2] != "--"]
This is great functionality to allow tests to be run multiple times. It might be useful to edit https://github.com/MarcoFalke/bitcoin/blob/Mf1705-qaWarnTestNotFound/test/README.md#functional-tests to specify that you can, in fact, run the same test a few times to catch intermittent errors.
228 | - if exclude_test + ".py" in test_list: 229 | - test_list.remove(exclude_test + ".py") 230 | + tests_excl = [re.sub("\.py$", "", t) + ".py" for t in args.exclude.split(',')] 231 | + for exclude_test in tests_excl: 232 | + if exclude_test in test_list: 233 | + test_list.remove(exclude_test)
This will only remove the first instance of exclude_test from test_list. It's now possible that there are multiple instances of the script from line 176 above. Something like this will work:
test_list = list(filter(lambda t: t == exclude_test, test_list))
This is a feature. If you really want to specify the same test multiple times, and then exclude it again, you need to specify it multiple times as well. Though, I doubt this will ever be relevant.
utACK fa57826bbf14e16a959b945a1cf74d2c58f257df
Everything looks good other than a couple of nits. Will test once nits addressed.
172 | @@ -173,7 +173,7 @@ def main():
173 | args, unknown_args = parser.parse_known_args()
174 |
175 | # Create a set to store arguments and create the passon string
nit: comment is now incorrect (since this is a list rather than a set)
Tested ACK fa57826bbf14e16a959b945a1cf74d2c58f257df
Thx for the feedback. Updated doc with --amend
utACK fac79e4