We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9c7bc0 commit b875beeCopy full SHA for b875bee
Lib/test/test_pyclbr.py
@@ -260,4 +260,12 @@ def test_module_has_no_spec(self):
260
261
262
if __name__ == "__main__":
263
+ import importlib.util
264
+
265
+ # Adding the __spec__ attribute to the __main__ module
266
+ if getattr(sys.modules["__main__"], "__spec__", None) is None:
267
+ sys.modules["__main__"].__spec__ = importlib.machinery.ModuleSpec(
268
+ name="__main__", loader=None, origin="builtin"
269
+ )
270
271
unittest_main()
0 commit comments