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