[pypy-svn] r72343 - in pypy/trunk/pypy/module: __pypy__ __pypy__/test _collections
xoraxax at codespeak.net
xoraxax at codespeak.net
Thu Mar 18 04:34:08 CET 2010
Author: xoraxax
Date: Thu Mar 18 04:34:06 2010
New Revision: 72343
Added:
pypy/trunk/pypy/module/__pypy__/interp_identitydict.py
- copied unchanged from r72307, pypy/trunk/pypy/module/_collections/interp_collection.py
pypy/trunk/pypy/module/__pypy__/test/test_identitydict.py
- copied, changed from r72307, pypy/trunk/pypy/module/_collections/test/test_collection.py
Removed:
pypy/trunk/pypy/module/_collections/
Modified:
pypy/trunk/pypy/module/__pypy__/__init__.py
Log:
Move identity dict from _collections to __pypy__.
Modified: pypy/trunk/pypy/module/__pypy__/__init__.py
==============================================================================
--- pypy/trunk/pypy/module/__pypy__/__init__.py (original)
+++ pypy/trunk/pypy/module/__pypy__/__init__.py Thu Mar 18 04:34:06 2010
@@ -10,6 +10,7 @@
interpleveldefs = {
'internal_repr' : 'interp_magic.internal_repr',
'bytebuffer' : 'bytebuffer.bytebuffer',
+ 'identity_dict' : 'interp_identitydict.W_IdentityDict',
}
def setup_after_space_initialization(self):
Copied: pypy/trunk/pypy/module/__pypy__/test/test_identitydict.py (from r72307, pypy/trunk/pypy/module/_collections/test/test_collection.py)
==============================================================================
--- pypy/trunk/pypy/module/_collections/test/test_collection.py (original)
+++ pypy/trunk/pypy/module/__pypy__/test/test_identitydict.py Thu Mar 18 04:34:06 2010
@@ -3,10 +3,10 @@
class AppTestIdentityDict:
def setup_class(cls):
- cls.space = gettestobjspace(usemodules=['_collections'])
+ cls.space = gettestobjspace(usemodules=['__pypy__'])
def test_numbers(self):
- from _collections import identity_dict
+ from __pypy__ import identity_dict
d = identity_dict()
d[0] = 1
d[0.0] = 2
@@ -18,7 +18,7 @@
assert not d
def test_get(self):
- from _collections import identity_dict
+ from __pypy__ import identity_dict
d = identity_dict()
d[None] = 1
@@ -28,7 +28,7 @@
assert d.get(1, 42) == 42
def test_unhashable(self):
- from _collections import identity_dict
+ from __pypy__ import identity_dict
d = identity_dict()
d[[]] = 1
@@ -43,7 +43,7 @@
raises(KeyError, d.__getitem__, [])
def test_keys(self):
- from _collections import identity_dict
+ from __pypy__ import identity_dict
d = identity_dict()
d[[]] = 1
d[[]] = 2
@@ -53,7 +53,7 @@
assert sorted(d.values()) == [1, 2, 3]
def test_in(self):
- from _collections import identity_dict
+ from __pypy__ import identity_dict
d = identity_dict()
d[None] = 1
More information about the Pypy-commit
mailing list