We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 49f258e commit f87da1bCopy full SHA for f87da1b
tests/test_modules.py
@@ -107,6 +107,9 @@ def test_def_submodule_failures():
107
sm_name_orig = sm.__name__
108
sm.__name__ = malformed_utf8
109
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.
113
with pytest.raises(SystemError):
114
m.def_submodule(sm, b"SubSubModuleName")
115
finally:
0 commit comments