-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
More revisions to test.support docs #77024
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Serhiy had made the following comments on the pull request for bpo-11015, but that PR was merged before applying his requested changes. This issue is to address his concerns. TESTFN_NONASCII - How different from TESTFN_UNICODE? Possibly group the next 3 to avoid repetition: make_legacy_pyc(source) - Add markup references to PEPs. match_test(test) and set_match_tests(patterns) - Used internally to regrtest. Remove or ask Victor to document as the current documentation is useless. check_impl_detail(**guards) - Document that a boolean is returned and check the docstring to include more information. get_original_stdout - Add (). strip_python_strerr(stderr) - Typo disable_faulthandler() - Wrong description. disable_gc() - Add that it works only if it was enabled. start_threads(threads, unlock=None) - Document that *threads* is a sequence of threads and document what unlock is. calcobjsize(fmt) - Add the purpose of this - calcobjsize() returns the size of Python object (PyObject) whose structure is defined by fmt with account of Python object header. requires_freebsd_version(*min_version) - Change to skip the test instead of Raise. cpython_only(test) - Remove argument. import_module(name, deprecated=False, *, required_on()) - Missed = check_free_after_iterating(test, iter, cls, args=()) - This description is misleading. This function doesn't test iter. iter is either iter or reversed, cls is a base iterable class, args are arguments for its constructor. The true description is too complex, I suggest to remove this function from the documentation. missing_compiler_executable(cmd_names=[]) - It is used only in distutils tests and should be in distutils.tests.support. CleanImport(*module_names) - Format DeprecationWarning as a link. DirsOnSysPath(*paths) - Format first sys.path as a link, Keeps the first one (in the above sentence) and format other mentions as ``sys.path`` or :data:`!sys.path`. SaveSignals() - How to use it? Matcher() - This class is used only in test_logging, and only with TestHandler. These classes should be documented together and with references to logging. I'm not sure they should be in test.support. BasicTestRunner() - This is an internal class used for implementing run_unittest(). No need to expose it. TestHandler(logging.handlers.BufferingHandler) - I'm not sure it should be in test.support rather of test_logging. assert_python_ok(args, **env_vars) - Since this is a keyword argument name, it should be formatter as *__cleanenv. |
I've made the changes requested. I wasn't sure about: TESTFN_NONASCII - How different from TESTFN_UNICODE? Should I move these out of test.support?: Thanks! |
For TESTFN_NONASCII vs TESTFN_UNICODE (inferred from reading the current code & 8b219b2):
(The two could potentially be consolidated by converting the tests that use TESTFN_UNICODE over to TESTFN_NONASCII, but for now it makes sense to just document the above differences) For the logging helpers, I'd check how they're used in test_logging: if they're used in logging configuration tests, they may be in test.support to avoid reimporting the module that defines the logging tests. If so, then they can be filed away in their own subsection at the end of the test.support documentation. If not, then yeah, moving them into test_logging would make sense. Similarly, moving the distutils helper makes sense to me, *unless* there's a specific reason that importing it from "distutils.tests.support" instead would be problematic. |
This is a rework of python#5774 on current main. I was a bit more conservative in making changes than the original PR. See @csabella's comments on issue python#77024 and the discussion on python#5774 for explanations of several of the changes. Co-authored-by: Cheryl Sabella <[email protected]>
This is a rework of #5774 on current main. I was a bit more conservative in making changes than the original PR. See @csabella's comments on issue #77024 and the discussion on #5774 for explanations of several of the changes. Co-authored-by: Cheryl Sabella <[email protected]> Co-authored-by: Alex Waygood <[email protected]>
This is a rework of pythonGH-5774 on current main. I was a bit more conservative in making changes than the original PR. See @csabella's comments on issue pythonGH-77024 and the discussion on pythonGH-5774 for explanations of several of the changes. Co-authored-by: Cheryl Sabella <[email protected]> Co-authored-by: Alex Waygood <[email protected]> (cherry picked from commit 8995177) Co-authored-by: Jelle Zijlstra <[email protected]>
This is a rework of pythonGH-5774 on current main. I was a bit more conservative in making changes than the original PR. See @csabella's comments on issue pythonGH-77024 and the discussion on pythonGH-5774 for explanations of several of the changes. Co-authored-by: Cheryl Sabella <[email protected]> Co-authored-by: Alex Waygood <[email protected]> (cherry picked from commit 8995177) Co-authored-by: Jelle Zijlstra <[email protected]>
This is a rework of GH-5774 on current main. I was a bit more conservative in making changes than the original PR. See @csabella's comments on issue GH-77024 and the discussion on GH-5774 for explanations of several of the changes. Co-authored-by: Cheryl Sabella <[email protected]> Co-authored-by: Alex Waygood <[email protected]> (cherry picked from commit 8995177) Co-authored-by: Jelle Zijlstra <[email protected]>
This is a rework of GH-5774 on current main. I was a bit more conservative in making changes than the original PR. See @csabella's comments on issue GH-77024 and the discussion on GH-5774 for explanations of several of the changes. Co-authored-by: Cheryl Sabella <[email protected]> Co-authored-by: Alex Waygood <[email protected]> (cherry picked from commit 8995177) Co-authored-by: Jelle Zijlstra <[email protected]>
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: