(self)
| 141 | raise KeyError("oops") |
| 142 | |
| 143 | def test_no_raise_message(self) -> None: |
| 144 | try: |
| 145 | pytest.raises(ValueError, int, "0") |
| 146 | except pytest.fail.Exception as e: |
| 147 | assert e.msg == f"DID NOT RAISE {repr(ValueError)}" |
| 148 | else: |
| 149 | assert False, "Expected pytest.raises.Exception" |
| 150 | |
| 151 | try: |
| 152 | with pytest.raises(ValueError): |
| 153 | pass |
| 154 | except pytest.fail.Exception as e: |
| 155 | assert e.msg == f"DID NOT RAISE {repr(ValueError)}" |
| 156 | else: |
| 157 | assert False, "Expected pytest.raises.Exception" |
| 158 | |
| 159 | @pytest.mark.parametrize("method", ["function", "function_match", "with"]) |
| 160 | def test_raises_cyclic_reference(self, method): |
nothing calls this directly
no outgoing calls
no test coverage detected