Skip to content

Commit f87da1b

Browse files
committed
Tweak comment instead of removing it.
1 parent 49f258e commit f87da1b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test_modules.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ def test_def_submodule_failures():
107107
sm_name_orig = sm.__name__
108108
sm.__name__ = malformed_utf8
109109
try:
110+
# We want to assert that a bad __name__ causes some kind of failure, although we do not want to exercise
111+
# the internals of PyModule_GetName(). Currently all supported Python versions raise SystemError. If that
112+
# changes in future Python versions, simply add the new expected exception types here.
110113
with pytest.raises(SystemError):
111114
m.def_submodule(sm, b"SubSubModuleName")
112115
finally:

0 commit comments

Comments
 (0)