()
| 146 | |
| 147 | |
| 148 | def test_make_keyword_only() -> None: |
| 149 | @_api.make_keyword_only("3.0", "arg") |
| 150 | def func(pre: Any, arg: Any, post: Any = None) -> None: |
| 151 | pass |
| 152 | |
| 153 | func(1, arg=2) # Check that no warning is emitted. |
| 154 | |
| 155 | with pytest.warns(mpl.MatplotlibDeprecationWarning): |
| 156 | func(1, 2) |
| 157 | with pytest.warns(mpl.MatplotlibDeprecationWarning): |
| 158 | func(1, 2, 3) |
| 159 | |
| 160 | |
| 161 | def test_deprecation_alternative() -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…