diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-07-03 22:30:49 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-07-03 22:30:49 +0300 |
commit | bae75cf3fe975d21c0c20baa595d21ebeca54681 (patch) | |
tree | 5d1b8a52a7c505d5eacd37f8525ccb230776ba27 /Lib/test/test_module.py | |
parent | 7e160ce356036bccda2608d9ee10bfe276dfa97a (diff) | |
parent | a793037d803abf098d172f686e2b95d27863c54d (diff) | |
download | cpython-git-bae75cf3fe975d21c0c20baa595d21ebeca54681.tar.gz |
Issue #19527: Fixed tests with defined COUNT_ALLOCS.
Diffstat (limited to 'Lib/test/test_module.py')
-rw-r--r-- | Lib/test/test_module.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_module.py b/Lib/test/test_module.py index ea6e89733b..6d0d59407e 100644 --- a/Lib/test/test_module.py +++ b/Lib/test/test_module.py @@ -1,7 +1,7 @@ # Test the module type import unittest import weakref -from test.support import gc_collect +from test.support import gc_collect, requires_type_collecting from test.support.script_helper import assert_python_ok import sys @@ -101,6 +101,7 @@ class ModuleTests(unittest.TestCase): gc_collect() self.assertEqual(f().__dict__["bar"], 4) + @requires_type_collecting def test_clear_dict_in_ref_cycle(self): destroyed = [] m = ModuleType("foo") @@ -214,6 +215,7 @@ a = A(destroyed)""" self.assertEqual(r[-len(ends_with):], ends_with, '{!r} does not end with {!r}'.format(r, ends_with)) + @requires_type_collecting def test_module_finalization_at_shutdown(self): # Module globals and builtins should still be available during shutdown rc, out, err = assert_python_ok("-c", "from test import final_a") |