summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unicode.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-03-30 17:43:06 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-03-30 17:43:06 (GMT)
commit14a7d6389fb453cca18d61bbe39deff7062bc66f (patch)
treed7e472d6fd44d7648ec2fd04dff7dd2c6ae7e393 /Lib/test/test_unicode.py
parentd524b705afd09bad3d097cb413eff342dd5a5982 (diff)
downloadcpython-14a7d6389fb453cca18d61bbe39deff7062bc66f.zip
cpython-14a7d6389fb453cca18d61bbe39deff7062bc66f.tar.gz
cpython-14a7d6389fb453cca18d61bbe39deff7062bc66f.tar.bz2
Issue #26494: Fixed crash on iterating exhausting iterators.
Affected classes are generic sequence iterators, iterators of bytearray, list, tuple, set, frozenset, dict, OrderedDict and corresponding views.
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r--Lib/test/test_unicode.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 63fb831..93224e1 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -1857,6 +1857,11 @@ class UnicodeTest(
unicode_encodedecimal(u"123" + s, "xmlcharrefreplace"),
'123' + exp)
+ def test_free_after_iterating(self):
+ test_support.check_free_after_iterating(self, iter, unicode)
+ test_support.check_free_after_iterating(self, reversed, unicode)
+
+
def test_main():
test_support.run_unittest(__name__)