test: Use pathlib over os path #28388

pull nsvrn wants to merge 2 commits into bitcoin:master from nsvrn:functests_use_pathlib changing 54 files +432 −462
  1. nsvrn commented at 11:47 PM on September 1, 2023: contributor

    In reference to issue #28362 refactoring of functional tests to use pathlib over os.path to reduce verbosity and increase the intuitiveness of managing file access.

  2. #28362 use pathlib over os path complete 2f35c4bae9
  3. Merge branch 'bitcoin:master' into functests_use_pathlib 39b6ee5684
  4. DrahtBot commented at 11:47 PM on September 1, 2023: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  5. DrahtBot added the label Tests on Sep 1, 2023
  6. DrahtBot added the label CI failed on Sep 2, 2023
  7. nsvrn commented at 3:40 AM on September 2, 2023: contributor

    will be resubmitting after resolving the issues

  8. nsvrn closed this on Sep 2, 2023

  9. in test/functional/combine_logs.py:16 in 39b6ee5684
      12 | @@ -13,8 +13,9 @@
      13 |  from collections import defaultdict, namedtuple
      14 |  import heapq
      15 |  import itertools
      16 | -import os
      17 | -import pathlib
      18 | +from os import access, R_OK
    


    maflcko commented at 8:47 AM on September 3, 2023:

    I think this can be left as-is (import os), because os.access(fullpath, os.R_OK) seems clearer (to me) than access(fullpath, R_OK). Also, it seems unrelated to pathlib and os.path changes, no?

  10. in test/functional/feature_logging.py:7 in 39b6ee5684
       3 | @@ -4,7 +4,8 @@
       4 |  # file COPYING or http://www.opensource.org/licenses/mit-license.php.
       5 |  """Test debug logging."""
       6 |  
       7 | -import os
       8 | +from os import devnull
    


    maflcko commented at 8:47 AM on September 3, 2023:

    same here, etc ...

  11. bitcoin locked this on Sep 3, 2024

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-14 21:13 UTC

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