()
| 849 | |
| 850 | |
| 851 | def test_deprecated_message(): |
| 852 | @_deprecated(message="woohoo") |
| 853 | def foo(): |
| 854 | return "bar" |
| 855 | |
| 856 | with pytest.warns(FutureWarning) as record: |
| 857 | assert foo() == "bar" |
| 858 | |
| 859 | assert len(record) == 1 |
| 860 | assert str(record[0].message) == "woohoo" |
| 861 | |
| 862 | |
| 863 | def test_typename(): |