[pypy-commit] pypy py3.3: Add a failing test that shows that interned strings are not always preserved.

amauryfa noreply at buildbot.pypy.org
Tue Mar 10 21:56:46 CET 2015


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3.3
Changeset: r76302:a0960c3a822c
Date: 2015-03-10 14:03 +0100
http://bitbucket.org/pypy/pypy/changeset/a0960c3a822c/

Log:	Add a failing test that shows that interned strings are not always
	preserved.

diff --git a/pypy/objspace/std/test/test_dictmultiobject.py b/pypy/objspace/std/test/test_dictmultiobject.py
--- a/pypy/objspace/std/test/test_dictmultiobject.py
+++ b/pypy/objspace/std/test/test_dictmultiobject.py
@@ -618,6 +618,10 @@
     def test_bytes_keys(self):
         assert isinstance(list({b'a': 1})[0], bytes)
 
+    def test_interned_keywords(self):
+        assert list(dict(abcdef=1))[0] is 'abcdef'
+
+
 class AppTest_DictMultiObject(AppTest_DictObject):
 
     def test_emptydict_unhashable(self):


More information about the pypy-commit mailing list