def test_xdict_key_intersection_when_none_present(self): xd = XDict({'one': 1, 'two': 1, 'three': 3}) xn = XDict({'oneone': 1, 'twotwo': 1, 'threethree': 3}) self.assertEqual(len(xd.intersection(xn)), 0) self.assertEqual(xd.intersection(xn), set([]))
def test_xdict_key_intersection_when_none_present(self): xd = XDict({'one': 1, 'two': 1, 'three': 3}) xn = XDict({'oneone': 1, 'twotwo': 1, 'threethree': 3}) self.assertEqual(len(xd.intersection(xn)), 0) self.assertEqual(xd.intersection(xn), set([]))
def test_xdict_key_intersection(self): xd = XDict({'one': 1, 'two': 1, 'three': 3}) xn = XDict({'one': 1, 'twotwo': 1, 'three': 3}) self.assertEqual(len(xd.intersection(xn)), 2) self.assertEqual(xd.intersection(xn), set(['one', 'three']))
def test_xdict_key_intersection(self): xd = XDict({'one': 1, 'two': 1, 'three': 3}) xn = XDict({'one': 1, 'twotwo': 1, 'three': 3}) self.assertEqual(len(xd.intersection(xn)), 2) self.assertEqual(xd.intersection(xn), set(['one', 'three']))