tests packageΒΆ

SubmodulesΒΆ

tests.test_detection moduleΒΆ

tests.test_detection.test_detection_functions()[source]ΒΆ
tests.test_detection.test_detection_heuristics_sorting()[source]ΒΆ

Detection heuristics must be sorted within each section.

tests.test_detection.github_runner_os()[source]ΒΆ

Returns the OS name as defined in the GitHub Actions matrix context.

Caution

This only works when running inside a GitHub Actions job that uses a matrix strategy with an os variant. Which is the case for the extra-platforms workflows.

Return type:

str | None

tests.test_detection.test_github_runner_detection()[source]ΒΆ

Test GitHub runner OS.

List of available GitHub runner images: https://github.com/actions/runner-images#available-images

tests.test_detection.test_mutual_exclusion()[source]ΒΆ

Only directly tests OSes on which the test suite is running via GitHub actions.

tests.test_group moduleΒΆ

tests.test_group.test_platform_deduplication()[source]ΒΆ
tests.test_group.test_platform_membership()[source]ΒΆ
tests.test_group.test_extract_members(items, expected)[source]ΒΆ
tests.test_group.test_extract_members_bad_type(item)[source]ΒΆ
tests.test_group.test_simple_union()[source]ΒΆ
tests.test_group.test_multiple_union()[source]ΒΆ
tests.test_group.test_single_intersection()[source]ΒΆ
tests.test_group.test_multiple_intersection()[source]ΒΆ
tests.test_group.test_single_difference()[source]ΒΆ
tests.test_group.test_multiple_difference()[source]ΒΆ
tests.test_group.test_symmetric_difference()[source]ΒΆ
tests.test_group.test_copy()[source]ΒΆ
tests.test_group.test_bool()[source]ΒΆ

Test __bool__() method for truth value testing.

tests.test_group.test_add()[source]ΒΆ

Test add() method for adding a single trait.

tests.test_group.test_remove()[source]ΒΆ

Test remove() method for removing a trait with error checking.

tests.test_group.test_discard()[source]ΒΆ

Test discard() method for removing a trait without error.

tests.test_group.test_pop()[source]ΒΆ

Test pop() method for removing and returning a trait.

tests.test_group.test_clear()[source]ΒΆ

Test clear() method for emptying a group.

tests.test_group.test_in_place_operators()[source]ΒΆ

Test in-place operators that return new instances.

tests.test_group.test_set_operations_with_new_methods()[source]ΒΆ

Test combining new methods with existing set operations.

tests.test_group_data moduleΒΆ

tests.test_group_data.test_group_data_ordering()[source]ΒΆ

Group instances follow logical order, not alphabetical.

tests.test_group_data.test_group_definitions()[source]ΒΆ
tests.test_group_data.test_group_constants()[source]ΒΆ

Group constants and IDs must be aligned.

tests.test_group_data.test_groups_content()[source]ΒΆ
tests.test_group_data.test_unique_icons()[source]ΒΆ

Check all group icons are unique.

tests.test_group_data.test_logical_grouping()[source]ΒΆ

Test logical grouping of platforms.

tests.test_group_data.test_group_no_missing_platform()[source]ΒΆ

Check all platform are attached to at least one group.

tests.test_group_data.test_non_overlapping_groups()[source]ΒΆ

Check non-overlapping groups are mutually exclusive.

tests.test_group_data.test_overlapping_groups()[source]ΒΆ

Check all extra groups overlaps with at least one non-overlapping.

tests.test_operations moduleΒΆ

tests.test_operations.test_unique_ids()[source]ΒΆ

Platform and group IDs must be unique.

tests.test_operations.randomize_case(strings)[source]ΒΆ
Return type:

set[str]

tests.test_operations.test_traits_from_ids(trait_id)[source]ΒΆ
tests.test_operations.test_traits_from_ids_group_resolve(group_id)[source]ΒΆ

traits_from_ids() can also resolve group IDs.

tests.test_operations.test_groups_from_ids(group_id)[source]ΒΆ
tests.test_operations.test_reduction(items, expected)[source]ΒΆ
tests.test_operations.test_reduce_custom_targets(items, expected)[source]ΒΆ

tests.test_platform moduleΒΆ

tests.test_platform_data moduleΒΆ

tests.test_platform_data.test_platform_data_sorting()[source]ΒΆ

Platform instances must be sorted alphabetically.

tests.test_platform_data.test_platform_definitions(platform)[source]ΒΆ
tests.test_platform_data.test_platform_website(platform)[source]ΒΆ

Test if platform website is reachable.

Place this test in a separate function so we can separate it from the platform data tests, and allow this test to be skipped while requiring the test above to always pass.

Some websites are known to be flaky, because they block access from GitHub Actions, or can’t take the load of requests from CI. We skip these platforms.

tests.test_pytest moduleΒΆ

tests.test_pytest.test_all_definition()[source]ΒΆ
tests.test_pytest.test_type_annotations()[source]ΒΆ

Check all @skip_*/@unless_* annotations are defined and sorted.

tests.test_pytest.test_skip_all_architectures()[source]ΒΆ
tests.test_pytest.test_skip_all_platforms()[source]ΒΆ
tests.test_pytest.test_unless_all_architectures()[source]ΒΆ
tests.test_pytest.test_unless_all_platforms()[source]ΒΆ
tests.test_pytest.test_skip_linux()[source]ΒΆ
tests.test_pytest.test_skip_macos()[source]ΒΆ
tests.test_pytest.test_skip_ubuntu()[source]ΒΆ
tests.test_pytest.test_skip_windows()[source]ΒΆ
tests.test_pytest.test_unless_linux()[source]ΒΆ
tests.test_pytest.test_unless_macos()[source]ΒΆ
tests.test_pytest.test_unless_ubuntu()[source]ΒΆ
tests.test_pytest.test_unless_windows()[source]ΒΆ

tests.test_root moduleΒΆ

tests.test_root.PROJECT_ROOT = PosixPath('/home/runner/work/extra-platforms/extra-platforms')ΒΆ

The root path of the project.

tests.test_root.PYPROJECT_PATH = PosixPath('/home/runner/work/extra-platforms/extra-platforms/pyproject.toml')ΒΆ

The path to the pyproject.toml file.

tests.test_root.PYPROJECT = {'build-system': {'build-backend': 'uv_build', 'requires': ['uv_build >= 0.9.0']}, 'dependency-groups': {'docs': ['click-extra [sphinx] >= 7.3.0', 'furo >= 2025.9.25', 'myst-parser >= 4.0.0', 'sphinx', 'sphinx-autodoc-typehints >= 2.4.0', 'sphinx-copybutton >= 0.5.2', 'sphinx-design >= 0.6.0', 'sphinx-issues >= 5.0.0', 'sphinxcontrib-mermaid >= 1.2.2', 'sphinxext-opengraph >= 0.13.0', "tomli >= 2.3.0 ; python_version < '3.11'"], 'test': ['coverage [toml] >= 7.11.0', 'pytest', 'pytest-cov >= 7.0.0', 'pytest-github-actions-annotate-failures >= 0.3.0', 'pytest-randomly >= 4.0.0', 'pytest-xdist [psutil] >= 3.7.0', 'requests >= 2.32.5', "tomli >= 2.3.0 ; python_version < '3.11'"], 'typing': ['types-requests >= 2.32.4.20250611']}, 'project': {'authors': [{'email': 'kevin@deldycke.com', 'name': 'Kevin Deldycke'}], 'classifiers': ['Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Environment :: MacOS X', 'Environment :: WebAssembly', 'Environment :: WebAssembly :: Emscripten', 'Environment :: WebAssembly :: WASI', 'Environment :: Win32 (MS Windows)', 'Framework :: Pytest', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)', 'Operating System :: Android', 'Operating System :: BeOS', 'Operating System :: MacOS', 'Operating System :: MacOS :: MacOS 9', 'Operating System :: MacOS :: MacOS X', 'Operating System :: Microsoft', 'Operating System :: Microsoft :: MS-DOS', 'Operating System :: Microsoft :: Windows', 'Operating System :: Microsoft :: Windows :: Windows 3.1 or Earlier', 'Operating System :: Microsoft :: Windows :: Windows 7', 'Operating System :: Microsoft :: Windows :: Windows 8', 'Operating System :: Microsoft :: Windows :: Windows 8.1', 'Operating System :: Microsoft :: Windows :: Windows 10', 'Operating System :: Microsoft :: Windows :: Windows 11', 'Operating System :: Microsoft :: Windows :: Windows 95/98/2000', 'Operating System :: Microsoft :: Windows :: Windows CE', 'Operating System :: Microsoft :: Windows :: Windows NT/2000', 'Operating System :: Microsoft :: Windows :: Windows Server 2003', 'Operating System :: Microsoft :: Windows :: Windows Server 2008', 'Operating System :: Microsoft :: Windows :: Windows Vista', 'Operating System :: Microsoft :: Windows :: Windows XP', 'Operating System :: OS Independent', 'Operating System :: OS/2', 'Operating System :: Other OS', 'Operating System :: PDA Systems', 'Operating System :: POSIX', 'Operating System :: POSIX :: AIX', 'Operating System :: POSIX :: BSD', 'Operating System :: POSIX :: BSD :: BSD/OS', 'Operating System :: POSIX :: BSD :: FreeBSD', 'Operating System :: POSIX :: BSD :: NetBSD', 'Operating System :: POSIX :: BSD :: OpenBSD', 'Operating System :: POSIX :: GNU Hurd', 'Operating System :: POSIX :: HP-UX', 'Operating System :: POSIX :: IRIX', 'Operating System :: POSIX :: Linux', 'Operating System :: POSIX :: Other', 'Operating System :: POSIX :: SCO', 'Operating System :: POSIX :: SunOS/Solaris', 'Operating System :: PalmOS', 'Operating System :: RISC OS', 'Operating System :: Unix', 'Operating System :: iOS', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: 3.13', 'Programming Language :: Python :: 3.14', 'Programming Language :: Python :: Implementation :: CPython', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: System :: Hardware', 'Topic :: System :: Operating System', 'Topic :: System :: Operating System Kernels', 'Topic :: System :: Operating System Kernels :: BSD', 'Topic :: System :: Operating System Kernels :: GNU Hurd', 'Topic :: System :: Operating System Kernels :: Linux', 'Topic :: Utilities', 'Typing :: Typed'], 'dependencies': ['distro >= 1.9.0'], 'description': 'Detect architectures, platforms and CI systems, and group them by family', 'entry-points': {'pytest11': {'extra-platforms': 'extra_platforms.pytest'}}, 'keywords': ['ALT Linux', 'Amazon Linux', 'Android', 'Arch Linux', 'Architecture detection', 'ARM (32-bit)', 'ARM64 (AArch64)', 'ARMv6 (little-endian)', 'ARMv7 (little-endian)', 'ARMv8 (32-bit, little-endian)', 'AT&T System Five', 'Azure Pipelines', 'Bamboo', 'Buildkite', 'Buildroot', 'CachyOS', 'CentOS', 'Circle CI', 'Cirrus CI', 'CloudLinux OS', 'CodeBuild', 'Cygwin', 'Debian', 'Exherbo Linux', 'Fedora', 'FreeBSD', 'Gentoo Linux', 'GitHub Actions runner', 'GitLab CI', 'GNU/Hurd', 'Guix System', 'Heroku CI', 'IBM AIX', 'IBM PowerKVM', 'IBM z/Architecture (s390x)', 'Intel 80386 (i386)', 'Intel Pentium (i586)', 'Intel Pentium Pro (i686)', 'KVM for IBM z Systems', 'Linux Mint', 'LoongArch (64-bit)', 'macOS', 'Mageia', 'Mandriva Linux', 'MidnightBSD', 'MIPS (32-bit, big-endian)', 'MIPS (32-bit, little-endian)', 'MIPS64 (big-endian)', 'MIPS64 (little-endian)', 'multiplatform', 'NetBSD', 'Nobara', 'OpenBSD', 'openSUSE', 'openSUSE Tumbleweed', 'Oracle Linux', 'OS detection', 'Parallels', 'Pidora', 'Platform detection', 'PowerPC (32-bit)', 'PowerPC 64-bit (big-endian)', 'PowerPC 64-bit (little-endian)', 'Pytest', 'Raspbian', 'RedHat Enterprise Linux', 'RISC-V (32-bit)', 'RISC-V (64-bit)', 'Rocky Linux', 'Scientific Linux', 'Slackware', 'Solaris', 'SPARC (32-bit)', 'SPARC (64-bit)', 'SunOS', 'SUSE Linux Enterprise Server', 'TeamCity', 'Travis CI', 'Tuxedo OS', 'Ubuntu', 'Ultramarine', 'Unix', 'WebAssembly (32-bit)', 'WebAssembly (64-bit)', 'Windows', 'Windows Subsystem for Linux', 'x86-64 (AMD64)', 'XenServer'], 'name': 'extra-platforms', 'optional-dependencies': {'pytest': ['pytest >= 8.2.1']}, 'readme': 'readme.md', 'requires-python': '>= 3.10', 'urls': {'Changelog': 'https://github.com/kdeldycke/extra-platforms/blob/main/changelog.md', 'Documentation': 'https://kdeldycke.github.io/extra-platforms', 'Funding': 'https://github.com/sponsors/kdeldycke', 'Homepage': 'https://github.com/kdeldycke/extra-platforms', 'Issues': 'https://github.com/kdeldycke/extra-platforms/issues', 'Repository': 'https://github.com/kdeldycke/extra-platforms'}, 'version': '6.0.0'}, 'tool': {'bumpversion': {'allow_dirty': True, 'current_version': '6.0.0', 'files': [{'glob': './**/__init__.py', 'ignore_missing_version': True}, {'filename': './pyproject.toml', 'replace': 'version = "{new_version}"', 'search': 'version = "{current_version}"'}, {'filename': './changelog.md', 'replace': '## [{new_version} (unreleased)](', 'search': '## [{current_version} (unreleased)]('}, {'filename': './citation.cff', 'replace': 'version: {new_version}', 'search': 'version: {current_version}'}, {'filename': './citation.cff', 'regex': True, 'replace': 'date-released: {utcnow:%Y-%m-%d}', 'search': 'date-released: \\d{{4}}-\\d{{2}}-\\d{{2}}'}]}, 'mypy': {'pretty': True, 'warn_redundant_casts': True, 'warn_return_any': True, 'warn_unreachable': True, 'warn_unused_configs': True, 'warn_unused_ignores': True}, 'pytest': {'ini_options': {'addopts': ['--durations=10', '--cov=extra_platforms', '--cov-branch', '--cov-precision=2', '--cov-report=term', '--cov-report=xml', '--junitxml=junit.xml', '--override-ini=junit_family=legacy'], 'xfail_strict': True}}, 'typos': {'default': {'extend-ignore-identifiers-re': ['Tru64', 'PASE', 'Sur']}}, 'uv': {'build-backend': {'module-root': ''}}}}ΒΆ

The parsed content of the pyproject.toml file.

tests.test_root.test_pyproject_keywords()[source]ΒΆ

Check that keywords in pyproject.toml are correct.

tests.test_root.test_pypoject_classifiers()[source]ΒΆ

Check that Trove classifiers in pyproject.toml are correct.

tests.test_root.test_module_root_declarations()[source]ΒΆ
tests.test_root.test_current_funcs()[source]ΒΆ
tests.test_root.test_group_membership_funcs()[source]ΒΆ
tests.test_root.test_invalidate_caches()[source]ΒΆ

Test that invalidate_caches() properly clears all caches.