File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,26 @@ def test_util_alias_import() -> None:
102
102
"""Targets of private aliases in the git module to some modules, not including util."""
103
103
104
104
105
+ _PRIVATE_MODULE_ALIAS_TARGET_NAMES = (
106
+ "git.refs.head" ,
107
+ "git.refs.log" ,
108
+ "git.refs.reference" ,
109
+ "git.refs.symbolic" ,
110
+ "git.refs.tag" ,
111
+ "git.index.base" ,
112
+ "git.index.fun" ,
113
+ "git.index.typ" ,
114
+ )
115
+ """Expected ``__name__`` attributes of targets of private aliases in the git module."""
116
+
117
+
118
+ def test_alias_target_module_names_are_by_location () -> None :
119
+ """The aliases are weird, but their targets are normal, even in ``__name__``."""
120
+ actual = [module .__name__ for module in _PRIVATE_MODULE_ALIAS_TARGETS ]
121
+ expected = list (_PRIVATE_MODULE_ALIAS_TARGET_NAMES )
122
+ assert actual == expected
123
+
124
+
105
125
def test_private_module_alias_access () -> None :
106
126
"""Non-util private alias access works but warns and is a deliberate mypy error."""
107
127
with pytest .deprecated_call () as ctx :
You can’t perform that action at this time.
0 commit comments