Hello,

While playing with the annotator/translator, I found
a strange test case.
The following code works:

from pypy.annotation.model import *
from pypy.annotation.dictdef import DictDef
def test_dictdef():
    def1 = DictDef(None, SomeInteger(), SomeInteger())
    def2 = DictDef(None, SomeInteger(), SomeInteger())
    dic1 = SomeDict(def1)
    dic2 = SomeDict(def2)
    assert not dic1 == dic2
    assert not dic1.contains(dic2)
    x = unionof(dic1, dic2)
    assert     dic1 == dic2         # !!!!!!!
    assert     dic1.contains(dic2)  # !!!!!!!

Is the "unionof" function expected to have side-effects?

Are the first two tests even correct? I would expect that
two dicts defined the same way would compare equal.

--
Amaury Forgeot d'Arc
Ubix Development
www.ubitrade.com

_______________________________________________
pypy-dev@codespeak.net
http://codespeak.net/mailman/listinfo/pypy-dev

Reply via email to