| 113 | assert_raises(AttributeError, should_raise) |
| 114 | |
| 115 | def test_contains(self): |
| 116 | keyed_tuple = self._fixture(["x", "y"], ["a", "b"]) |
| 117 | |
| 118 | is_true("x" in keyed_tuple) |
| 119 | is_false("z" in keyed_tuple) |
| 120 | |
| 121 | is_true("z" not in keyed_tuple) |
| 122 | is_false("x" not in keyed_tuple) |
| 123 | |
| 124 | # we don't do keys |
| 125 | is_false("a" in keyed_tuple) |
| 126 | is_false("z" in keyed_tuple) |
| 127 | is_true("a" not in keyed_tuple) |
| 128 | is_true("z" not in keyed_tuple) |
| 129 | |
| 130 | def test_contains_mapping(self): |
| 131 | keyed_tuple = self._fixture(["x", "y"], ["a", "b"])._mapping |