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 463eb5c commit 29033d4Copy full SHA for 29033d4
1 file changed
Lib/test/test_weakref.py
@@ -9,6 +9,7 @@
9
import copy
10
import threading
11
import time
12
+import types
13
import random
14
import textwrap
15
@@ -2252,6 +2253,13 @@ def test_names(self):
2252
2253
self.assertEqual(obj.__name__, name)
2254
self.assertEqual(obj.__qualname__, name)
2255
2256
+ def test_module_dealloc(self):
2257
+ mod = types.ModuleType("temp_mod")
2258
+ r = weakref.ref(mod)
2259
+ self.assertIsNotNone(r, "weak ref to a module should not be None")
2260
+
2261
+ del mod
2262
2263
2264
libreftest = """ Doctest for examples in the library reference: weakref.rst
2265
0 commit comments