Lines Matching refs:knownkey
53 knownkey = list(self.other.keys())[0]
54 self.assertRaises(KeyError, lambda:d[knownkey])
86 knownkey, knownvalue = next(iter(self.other.items()))
88 self.assertEqual(d.get(knownkey, knownvalue), knownvalue)
89 self.assertNotIn(knownkey, d)
112 knownkey, knownvalue = next(iter(self.other.items()))
115 self.assertEqual(d.setdefault(knownkey, knownvalue), knownvalue)
116 self.assertEqual(d[knownkey], knownvalue)
118 self.assertEqual(d.pop(knownkey), knownvalue)
119 self.assertNotIn(knownkey, d)
120 self.assertRaises(KeyError, d.pop, knownkey)
122 d[knownkey] = knownvalue
123 self.assertEqual(d.pop(knownkey, default), knownvalue)
124 self.assertNotIn(knownkey, d)
125 self.assertEqual(d.pop(knownkey, default), default)