Skip to content

Commit d54f851

Browse files
committed
Add test of dir() on git.compat
1 parent f4e5f42 commit d54f851

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/deprecation/test_compat.py

+14
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,17 @@ def test_is_platform() -> None:
5151
assert is_win == (os.name == "nt")
5252
assert is_posix == (os.name == "posix")
5353
assert is_darwin == (sys.platform == "darwin")
54+
55+
56+
def test_dir() -> None:
57+
"""dir() on git.compat lists attributes meant to be public, even if deprecated."""
58+
expected = {
59+
"defenc",
60+
"safe_decode",
61+
"safe_encode",
62+
"win_encode",
63+
"is_darwin",
64+
"is_win",
65+
"is_posix",
66+
}
67+
assert expected <= set(dir(git.compat))

0 commit comments

Comments
 (0)