tests: exclude all tests with difference parameters in --exclude list #14316

pull ken2812221 wants to merge 1 commits into bitcoin:master from ken2812221:2018-09-25-test-fix changing 2 files +7 −5
  1. ken2812221 commented at 3:16 am on September 25, 2018: contributor
    Fix broken exclusion list in functional tests. See #14007#pullrequestreview-158309105
  2. ken2812221 renamed this:
    tests: exclude all tests with difference parameters
    tests: exclude all tests with difference parameters in `--exclude` list
    on Sep 25, 2018
  3. ken2812221 force-pushed on Sep 25, 2018
  4. fanquake added the label Tests on Sep 25, 2018
  5. DrahtBot commented at 4:32 am on September 25, 2018: member
    • #14320 ([bugfix] wallet: Fix duplicate fileid detection by ken2812221)

    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.

  6. in test/functional/test_runner.py:291 in 61fb484af9 outdated
    289+        exclude_tests = [re.sub("\.py$", "", test) for test in args.exclude.split(',')]
    290         for exclude_test in exclude_tests:
    291-            if exclude_test in test_list:
    292-                test_list.remove(exclude_test)
    293-            else:
    294+            exclude_list = [test for test in test_list if test.split('.py')[0] == exclude_test]
    


    jnewbery commented at 3:33 pm on September 25, 2018:
    Could probably do with a comment here to explain why you’re doing this (removing <test_name>.py and <test_name>.py --arg from the test list)
  7. jnewbery commented at 3:33 pm on September 25, 2018: member
    utACK with one request for a comment.
  8. in test/functional/test_runner.py:288 in 61fb484af9 outdated
    284@@ -285,11 +285,12 @@ def main():
    285 
    286     # Remove the test cases that the user has explicitly asked to exclude.
    287     if args.exclude:
    288-        exclude_tests = [re.sub("\.py$", "", test) + (".py" if ".py" not in test else "") for test in args.exclude.split(',')]
    289+        exclude_tests = [re.sub("\.py$", "", test) for test in args.exclude.split(',')]
    


    MarcoFalke commented at 5:28 pm on September 25, 2018:
    nit: could remove the use of the re module, since it is no longer required? "foo.py".split('.py')[0] == "foo".split('.py')[0]
  9. DrahtBot added the label Needs rebase on Sep 25, 2018
  10. ken2812221 force-pushed on Sep 25, 2018
  11. ken2812221 force-pushed on Sep 25, 2018
  12. tests: exclude all tests with difference parameters c7b3e487f2
  13. ken2812221 force-pushed on Sep 25, 2018
  14. DrahtBot removed the label Needs rebase on Sep 25, 2018
  15. in test/functional/test_runner.py:288 in c7b3e487f2
    284@@ -285,11 +285,13 @@ def main():
    285 
    286     # Remove the test cases that the user has explicitly asked to exclude.
    287     if args.exclude:
    288-        exclude_tests = [re.sub("\.py$", "", test) + (".py" if ".py" not in test else "") for test in args.exclude.split(',')]
    289+        exclude_tests = [test.split('.py')[0] for test in args.exclude.split(',')]
    


    jimmysong commented at 0:03 am on September 27, 2018:
    nit: I prefer test.strip('.py') just in case there’s a very unlikely ‘.py’ in the middle of a file name.

    MarcoFalke commented at 1:38 am on September 27, 2018:

    Wouldn’t work with args?

    0>>> 'foo.py --arg'.strip('.py')
    1'foo.py --arg'
    
  16. in test/functional/test_runner.py:291 in c7b3e487f2
    290         for exclude_test in exclude_tests:
    291-            if exclude_test in test_list:
    292-                test_list.remove(exclude_test)
    293-            else:
    294+            # Remove <test_name>.py and <test_name>.py --arg from the test list
    295+            exclude_list = [test for test in test_list if test.split('.py')[0] == exclude_test]
    


    jimmysong commented at 0:04 am on September 27, 2018:
    nit: same as above. test.strip('.py') is preferable over test.split('.py')[0] and reads a little better.
  17. jimmysong commented at 0:06 am on September 27, 2018: contributor
    Couple of nits , but otherwise looks good.
  18. MarcoFalke commented at 1:38 am on September 27, 2018: member
    utACK c7b3e487f229142795a0b3ce6ce409ce7084d966
  19. MarcoFalke referenced this in commit 9b8bb5f140 on Sep 27, 2018
  20. MarcoFalke merged this on Sep 27, 2018
  21. MarcoFalke closed this on Sep 27, 2018

  22. ken2812221 deleted the branch on Sep 27, 2018
  23. DrahtBot locked this on Sep 8, 2021

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: 2024-11-17 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me