diff options
author | Mark Shannon <mark@hotpy.org> | 2021-11-29 12:34:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-29 12:34:59 (GMT) |
commit | 60929576e40038ec71d896230f69e4411c82be4b (patch) | |
tree | 34dc24d0a73ef0205514202820d66c152260dc22 /Lib | |
parent | 7431448b817d3bf87f71661cf8f3d537807ab2e2 (diff) | |
download | cpython-60929576e40038ec71d896230f69e4411c82be4b.zip cpython-60929576e40038ec71d896230f69e4411c82be4b.tar.gz cpython-60929576e40038ec71d896230f69e4411c82be4b.tar.bz2 |
bpo-45786: Allocate space for frame in frame object. (GH-29729)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_exceptions.py | 6 | ||||
-rw-r--r-- | Lib/test/test_sys.py | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 7f087d0..c666004 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -209,7 +209,7 @@ class ExceptionTests(unittest.TestCase): src = src.decode(encoding, 'replace') line = src.split('\n')[lineno-1] self.assertIn(line, cm.exception.text) - + def test_error_offset_continuation_characters(self): check = self.check check('"\\\n"(1 for c in I,\\\n\\', 2, 2) @@ -1342,9 +1342,7 @@ class ExceptionTests(unittest.TestCase): """ with SuppressCrashReport(): rc, out, err = script_helper.assert_python_failure("-c", code) - self.assertIn(b'Fatal Python error: _PyErr_NormalizeException: ' - b'Cannot recover from MemoryErrors while ' - b'normalizing exceptions.', err) + self.assertIn(b'MemoryError', err) @cpython_only def test_MemoryError(self): diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index b0688e1..db8d008 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -1320,9 +1320,10 @@ class SizeofTest(unittest.TestCase): # sys.floatinfo check(sys.float_info, vsize('') + self.P * len(sys.float_info)) # frame - import inspect - x = inspect.currentframe() - check(x, size('3Pi3c')) + def func(): + return sys._getframe() + x = func() + check(x, size('3Pi3c8P2iciP')) # function def func(): pass check(func, size('14Pi')) |