File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments