Lines Matching full:keys

10         kt = type({}.keys())
22 keys = d.keys()
23 self.assertEqual(len(keys), 2)
24 self.assertEqual(set(keys), {1, "a"})
25 self.assertEqual(keys, {1, "a"})
26 self.assertNotEqual(keys, {1, "a", "b"})
27 self.assertNotEqual(keys, {1, "b"})
28 self.assertNotEqual(keys, {1})
29 self.assertNotEqual(keys, 42)
30 self.assertIn(1, keys)
31 self.assertIn("a", keys)
32 self.assertNotIn(10, keys)
33 self.assertNotIn("Z", keys)
34 self.assertEqual(d.keys(), d.keys())
36 self.assertEqual(d.keys(), e.keys())
38 self.assertNotEqual(d.keys(), e.keys())
66 self.assertEqual(d.keys(), e.items())
67 self.assertNotEqual(d.items(), e.keys())
82 r = repr(d.keys())
95 self.assertEqual(d1.keys() & d1.keys(), {'a', 'b'})
96 self.assertEqual(d1.keys() & d2.keys(), {'b'})
97 self.assertEqual(d1.keys() & d3.keys(), set())
98 self.assertEqual(d1.keys() & set(d1.keys()), {'a', 'b'})
99 self.assertEqual(d1.keys() & set(d2.keys()), {'b'})
100 self.assertEqual(d1.keys() & set(d3.keys()), set())
101 self.assertEqual(d1.keys() & tuple(d1.keys()), {'a', 'b'})
103 self.assertEqual(d1.keys() | d1.keys(), {'a', 'b'})
104 self.assertEqual(d1.keys() | d2.keys(), {'a', 'b', 'c'})
105 self.assertEqual(d1.keys() | d3.keys(), {'a', 'b', 'd', 'e'})
106 self.assertEqual(d1.keys() | set(d1.keys()), {'a', 'b'})
107 self.assertEqual(d1.keys() | set(d2.keys()), {'a', 'b', 'c'})
108 self.assertEqual(d1.keys() | set(d3.keys()),
110 self.assertEqual(d1.keys() | (1, 2), {'a', 'b', 1, 2})
112 self.assertEqual(d1.keys() ^ d1.keys(), set())
113 self.assertEqual(d1.keys() ^ d2.keys(), {'a', 'c'})
114 self.assertEqual(d1.keys() ^ d3.keys(), {'a', 'b', 'd', 'e'})
115 self.assertEqual(d1.keys() ^ set(d1.keys()), set())
116 self.assertEqual(d1.keys() ^ set(d2.keys()), {'a', 'c'})
117 self.assertEqual(d1.keys() ^ set(d3.keys()),
119 self.assertEqual(d1.keys() ^ tuple(d2.keys()), {'a', 'c'})
121 self.assertEqual(d1.keys() - d1.keys(), set())
122 self.assertEqual(d1.keys() - d2.keys(), {'a'})
123 self.assertEqual(d1.keys() - d3.keys(), {'a', 'b'})
124 self.assertEqual(d1.keys() - set(d1.keys()), set())
125 self.assertEqual(d1.keys() - set(d2.keys()), {'a'})
126 self.assertEqual(d1.keys() - set(d3.keys()), {'a', 'b'})
127 self.assertEqual(d1.keys() - (0, 1), {'a', 'b'})
129 self.assertFalse(d1.keys().isdisjoint(d1.keys()))
130 self.assertFalse(d1.keys().isdisjoint(d2.keys()))
131 self.assertFalse(d1.keys().isdisjoint(list(d2.keys())))
132 self.assertFalse(d1.keys().isdisjoint(set(d2.keys())))
133 self.assertTrue(d1.keys().isdisjoint({'x', 'y', 'z'}))
134 self.assertTrue(d1.keys().isdisjoint(['x', 'y', 'z']))
135 self.assertTrue(d1.keys().isdisjoint(set(['x', 'y', 'z'])))
136 self.assertTrue(d1.keys().isdisjoint(set(['x', 'y'])))
137 self.assertTrue(d1.keys().isdisjoint(['x', 'y']))
138 self.assertTrue(d1.keys().isdisjoint({}))
139 self.assertTrue(d1.keys().isdisjoint(d3.keys()))
142 self.assertTrue(de.keys().isdisjoint(set()))
143 self.assertTrue(de.keys().isdisjoint([]))
144 self.assertTrue(de.keys().isdisjoint(de.keys()))
145 self.assertTrue(de.keys().isdisjoint([1]))
224 self.assertRaises(TypeError, copy.copy, d.keys())
243 self.assertIn(k1, d.keys())
248 self.assertRaises(Exc, d.keys().__contains__, k2)
258 pickle.dumps, d.keys(), proto)
267 self.assertIsInstance(d.keys(), collections.abc.KeysView)
268 self.assertIsInstance(d.keys(), collections.abc.MappingView)
269 self.assertIsInstance(d.keys(), collections.abc.Set)
270 self.assertIsInstance(d.keys(), collections.abc.Sized)
271 self.assertIsInstance(d.keys(), collections.abc.Iterable)
272 self.assertIsInstance(d.keys(), collections.abc.Container)