Skip to content

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

Merged
merged 1 commit into from
Feb 11, 2018

Conversation

csabella
Copy link
Contributor

@csabella csabella commented Feb 10, 2018

@ncoghlan
Copy link
Contributor

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).

@miss-islington
Copy link
Contributor

Thanks @csabella for the PR, and @ncoghlan for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 11, 2018
(cherry picked from commit 988fb28)

Co-authored-by: Cheryl Sabella <[email protected]>
@bedevere-bot
Copy link

GH-5619 is a backport of this pull request to the 3.7 branch.

possible to generate such a filename.


.. data:: TESTFN_NONASCII
Copy link
Member

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.
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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()
Copy link
Member

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()
Copy link
Member

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)
Copy link
Member

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
Copy link
Member

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*.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants