Skip to content

Commit 417143e

Browse files
committed
Add docs, including some existing is_xxx's.
1 parent 35960c1 commit 417143e

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

Doc/library/test.rst

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,27 @@ The :mod:`test.support` module defines the following constants:
246246

247247
.. data:: is_android
248248

249-
``True`` if the system is Android.
249+
``True`` if ``sys.platform`` is ``android``.
250+
251+
252+
.. data:: is_emscripten
253+
254+
``True`` if ``sys.platform`` is ``emscripten``.
255+
256+
257+
.. data:: is_wasi
258+
259+
``True`` if ``sys.platform`` is ``wasi``.
260+
261+
262+
.. data:: is_apple_mobile
263+
264+
``True`` if ``sys.platform`` is ``ios``, ``tvos``, or ``watchos``.
265+
266+
267+
.. data:: is_apple
268+
269+
``True`` if ``sys.platform`` is ``darwin`` or ``is_apple_mobile`` is ``True``.
250270

251271

252272
.. data:: unix_shell
@@ -831,6 +851,15 @@ The :mod:`test.support` module defines the following functions:
831851
Decorator for tests that fill the address space.
832852

833853

854+
.. function:: linked_with_musl()
855+
856+
Return ``False`` if there is no evidence the interperter was compiled with
857+
``musl``, otherwise return a version triple, either ``(0, 0, 0)`` if the
858+
version is unknown, or the actual version if it is known. Intended for use
859+
in ``skip`` decorators. ``emscripten`` and ``wasi`` are assumed to be
860+
compiled with ``musl``; othewise ``platform.libc_ver`` is checked.
861+
862+
834863
.. function:: check_syntax_error(testcase, statement, errtext='', *, lineno=None, offset=None)
835864

836865
Test for syntax errors in *statement* by attempting to compile *statement*.

0 commit comments

Comments
 (0)