bpo-40275: Adding filesystem_helper submodule in test.support#20689
bpo-40275: Adding filesystem_helper submodule in test.support#20689shihai1991 wants to merge 1 commit intopython:masterfrom
Conversation
|
@vstinner Hi, victor. How about this PR of fileystem_helper? |
|
I would prefer to create the whole helper module at once, but then we can convert existing tests to this helper by small PR modifying a bunch of tests (not all tests at once). I proposed: About the file name, there is Python/fileutils.h. Here "utils" becomes "helper". Maybe the module can be named "test.support.file_helper"? It is shorter than "filesystem_helper" and so helps to fit into 80 columns. Another possible name is "os_helper" since the functions that I proposed are not only about files. make_bad_fd() and fd_count() are about file descriptors, not "regular (named) files". I have a preference for "os_helper". Moreover, maybe we should have one PR per new helper submodule, and wait until enough helper submodules are created before starting the bunch of "cleanup" changes which use helper modules rather than test.support. I'm thinking at my other propositions:
|
+1, os means that it have include filesystem already.
make sense. |
|
I create an os_helper submodule in #20732, so I close this PR. |
Add a new test.support.filesystem_helper submodule and move TESTFN to filesystem_helper.
https://bugs.python.org/issue40275