Skip to content

Commit 488cc13

Browse files
committed
Add test of dir() on git.types
1 parent 4857ff0 commit 488cc13

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

test/deprecation/test_types.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,30 @@ def test_can_access_lit_commit_ish_but_it_is_not_usable() -> None:
3737

3838
# It should be as documented (even though deliberately unusable in static checks).
3939
assert Lit_commit_ish == Literal["commit", "tag"]
40+
41+
42+
def test_dir() -> None:
43+
"""dir() on git.types includes public names, even ``Lit_commit_ish``.
44+
45+
It also contains private names that we don't test. See test_compat.test_dir.
46+
"""
47+
expected_subset = {
48+
"PathLike",
49+
"TBD",
50+
"AnyGitObject",
51+
"Tree_ish",
52+
"Commit_ish",
53+
"GitObjectTypeString",
54+
"Lit_commit_ish",
55+
"Lit_config_levels",
56+
"ConfigLevels_Tup",
57+
"CallableProgress",
58+
"assert_never",
59+
"Files_TD",
60+
"Total_TD",
61+
"HSH_TD",
62+
"Has_Repo",
63+
"Has_id_attribute",
64+
}
65+
actual = set(dir(git.types))
66+
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