Skip to content

Commit

Permalink
Add a full set of platform IDs.
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke committed Dec 28, 2022
1 parent 0e071c6 commit 28eeec4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions click_extra/platform.py
Expand Up @@ -138,6 +138,8 @@ def is_windows():
)
"""Map OS IDs to evaluation function and OS labels."""

ANY_PLATFORM = frozenset(OS_DEFINITIONS)
""" IDs of all platforms."""

ANY_UNIX = frozenset(set(OS_DEFINITIONS) - {WINDOWS})
""" IDs of all Unix-like operating systems and compatibility layers."""
Expand Down
2 changes: 2 additions & 0 deletions click_extra/tests/test_platform.py
Expand Up @@ -24,6 +24,7 @@
ANY_BSD,
ANY_LINUX,
ANY_OTHER_UNIX,
ANY_PLATFORM,
ANY_UNIX,
ANY_UNIX_COMPATIBILITY_LAYER,
ANY_UNIX_SYSTEM_V,
Expand Down Expand Up @@ -115,6 +116,7 @@ def test_unix_family_content():


def test_unix_family_subsets():
assert {WINDOWS} | ANY_UNIX == ANY_PLATFORM
assert (
ANY_BSD
| ANY_LINUX
Expand Down

0 comments on commit 28eeec4

Please sign in to comment.