def test_all(self):
        d = PyStringMap()
        # Test __setitem__
        d["one"] = 1

        # Test __getitem__
        self.assertEqual(d["one"], 1)
        self.assertRaises(KeyError, d.__getitem__, "two")

        # Test __delitem__
        del d["one"]
        self.assertRaises(KeyError, d.__delitem__, "one")

        # Test clear
        d.update(self._reference())
        d.clear()
        self.assertEqual(d, {})

        # Test copy()
        d.update(self._reference())
        da = d.copy()
        self.assertEqual(d, da)

        # Test keys, items, values
        r = self._reference()
        d.update(self._reference())
        for k in d.keys():
            self.failUnless(k in r.keys())
        for i in d.items():
            self.failUnless(i in r.items())
        for v in d.values():
            self.failUnless(v in r.values())

        # Test has_key and "in".
        for i in r.keys():
            self.assert_(d.has_key(i))
            self.assert_(d in i)
dataset/ETHPy150Open babble/babble/include/jython/Lib/test/test_stringmap.py/PyStringMapTest.test_all/swapped operands of `in`