Skip to content

Commit 4857ff0

Browse files
committed
Clarify test_compat.test_dir
1 parent e3675a0 commit 4857ff0

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

test/deprecation/test_compat.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,19 @@ def test_is_platform() -> None:
6363

6464

6565
def test_dir() -> None:
66-
"""dir() on git.compat lists attributes meant to be public, even if deprecated."""
66+
"""dir() on git.compat includes all public attributes, even if deprecated.
67+
68+
As dir() usually does, it also has nonpublic attributes, which should also not be
69+
removed by a custom __dir__ function, but those are less important to test.
70+
"""
6771
expected_subset = {
72+
"is_win",
73+
"is_posix",
74+
"is_darwin",
6875
"defenc",
6976
"safe_decode",
7077
"safe_encode",
7178
"win_encode",
72-
"is_darwin",
73-
"is_win",
74-
"is_posix",
7579
}
7680
actual = set(dir(git.compat))
7781
assert expected_subset <= actual

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy