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