Skip to content

Commit

Permalink
Clarify comment about is_<platform> value assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
EliahKagan committed Mar 29, 2024
1 parent 488cc13 commit 19b3c08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/deprecation/test_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ def test_is_platform() -> None:
for fullname, message in zip(fully_qualified_names, messages):
assert message.startswith(_MESSAGE_LEADER.format(fullname))

# These exactly reproduce the expressions in the code under test, so they are not
# good for testing that the values are correct. Instead, the purpose of this test is
# to ensure that any dynamic machinery put in place in git.compat to cause warnings
# to be issued does not get in the way of the intended values being accessed.
# These assertions exactly reproduce the expressions in the code under test, so they
# are not good for testing that the values are correct. Instead, their purpose is to
# ensure that any dynamic machinery put in place in git.compat to cause warnings to
# be issued does not get in the way of the intended values being accessed.
assert is_win == (os.name == "nt")
assert is_posix == (os.name == "posix")
assert is_darwin == (sys.platform == "darwin")
Expand Down

0 comments on commit 19b3c08

Please sign in to comment.