diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-03-30 20:40:02 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-03-30 20:40:02 +0300 |
commit | fbb1c5ee068d209e33f6e15ecb4821d5d8b107fa (patch) | |
tree | 4ae6657a598c5cfe5357f3106d956ed721d83e24 /Lib/test/test_unicode.py | |
parent | 13b3acd13e35b5e619c3d1aab90aaf54abc1fb53 (diff) | |
download | cpython-git-fbb1c5ee068d209e33f6e15ecb4821d5d8b107fa.tar.gz |
Issue #26494: Fixed crash on iterating exhausting iterators.
Affected classes are generic sequence iterators, iterators of str, bytes,
bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding
views and os.scandir() iterator.
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r-- | Lib/test/test_unicode.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index c30310e1ae..c2811468ba 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -2729,6 +2729,10 @@ class UnicodeTest(string_tests.CommonTest, # Check that the second call returns the same result self.assertEqual(getargs_s_hash(s), chr(k).encode() * (i + 1)) + def test_free_after_iterating(self): + support.check_free_after_iterating(self, iter, str) + support.check_free_after_iterating(self, reversed, str) + class StringModuleTest(unittest.TestCase): def test_formatter_parser(self): |