-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-11015: Update test.support documentation #5610
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
Conversation
Thank you! I'm going to go ahead and merge this version - if we find potential points of clarification in particular entries, this PR may still be a good place to comment on that, or else folks can just submit their own PRs directly. I'll also flag the change for backport to 3.7, but will leave 3.6 alone for now (as I believe some of these APIs don't exist on that branch). |
(cherry picked from commit 988fb28) Co-authored-by: Cheryl Sabella <[email protected]>
GH-5619 is a backport of this pull request to the 3.7 branch. |
possible to generate such a filename. | ||
|
||
|
||
.. data:: TESTFN_NONASCII |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not clear the difference between TESTFN_UNICODE
and TESTFN_NONASCII
.
|
||
.. data:: PGO | ||
|
||
Set when tests can be skipped when they are not useful for PGO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set to what value? I suppose this is a boolean value which is True on PGO build and False otherwise.
to make writes blocking. | ||
|
||
|
||
.. data:: TEST_SUPPORT_DIR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is not used.
Set to :data:`sys.maxsize` for big memory tests. | ||
|
||
|
||
.. data:: max_memuse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is not used.
|
||
.. data:: MISSING_C_DOCSTRINGS | ||
|
||
Return ``True`` if running on CPython, not on Windows, and configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not return. This isn't a function, but a boolean constant.
|
||
.. class:: SaveSignals() | ||
|
||
Class to save and restore signal handlers registered by the Python signal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to use it?
handler. | ||
|
||
|
||
.. class:: Matcher() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
.
.. class:: WarningsRecorder() | ||
|
||
Class used to record warnings for unit tests. See documentation of | ||
:func:`check_warnings` above for more details. | ||
|
||
|
||
.. class:: BasicTestRunner() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an internal class used for implementing run_unittest()
. No need to expose it.
Run *test* and return the result. | ||
|
||
|
||
.. class:: TestHandler(logging.handlers.BufferingHandler) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to use it?
I'm not sure it should be in test.support
rather of test_logging.
variables *env_vars* succeeds (``rc == 0``) and return a ``(return code, | ||
stdout, stderr)`` tuple. | ||
|
||
If the ``__cleanenv`` keyword is set, *env_vars* is used as a fresh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is a keyword argument name, it should be formatter as *__cleanenv*
.
https://bugs.python.org/issue11015