Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4857ff0

Browse files
committed
Clarify test_compat.test_dir
1 parente3675a0 commit4857ff0

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
deftest_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
assertexpected_subset<=actual

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp