diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-07-03 19:27:26 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-07-03 19:27:26 (GMT) |
commit | a793037d803abf098d172f686e2b95d27863c54d (patch) | |
tree | b1723194b3e1d1584f16c5a8b811f93c8a34fb1d /Lib/test/test_sys.py | |
parent | af65872da2b679e4b1876412aab6a731f82a469f (diff) | |
download | cpython-a793037d803abf098d172f686e2b95d27863c54d.zip cpython-a793037d803abf098d172f686e2b95d27863c54d.tar.gz cpython-a793037d803abf098d172f686e2b95d27863c54d.tar.bz2 |
Issue #19527: Fixed tests with defined COUNT_ALLOCS.
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r-- | Lib/test/test_sys.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index a531879..4435d69 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -803,6 +803,7 @@ class SysModuleTest(unittest.TestCase): c = sys.getallocatedblocks() self.assertIn(c, range(b - 50, b + 50)) + @test.support.requires_type_collecting def test_is_finalizing(self): self.assertIs(sys.is_finalizing(), False) # Don't use the atexit module because _Py_Finalizing is only set @@ -1083,9 +1084,12 @@ class SizeofTest(unittest.TestCase): check((1,2,3), vsize('') + 3*self.P) # type # static type: PyTypeObject - s = vsize('P2n15Pl4Pn9Pn11PIP') + fmt = 'P2n15Pl4Pn9Pn11PIP' + if hasattr(sys, 'getcounts'): + fmt += '3n2P' + s = vsize(fmt) check(int, s) - s = vsize('P2n15Pl4Pn9Pn11PIP' # PyTypeObject + s = vsize(fmt + # PyTypeObject '3P' # PyAsyncMethods '36P' # PyNumberMethods '3P' # PyMappingMethods |