Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

- Add python 3.13 to list of supported versions ([#158](https://github.com/mpytools/mplotutils/pull/158)).
- Increased test coverage ([#180](https://github.com/mpytools/mplotutils/pull/180), [#181](https://github.com/mpytools/mplotutils/pull/181),
and [#182](https://github.com/mpytools/mplotutils/pull/182)).
[#182](https://github.com/mpytools/mplotutils/pull/182), and [#207](https://github.com/mpytools/mplotutils/pull/207)).

### Bug fixes

Expand Down
16 changes: 16 additions & 0 deletions mplotutils/tests/test_get_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,19 @@ def test_get_renderer(backend):

with figure_context() as f:
_get_renderer(f)


def test_error_message_get_renderer():

# it's a fallback so should never be triggered - here I test the error message only

backend = matplotlib.get_backend()

class FakeFig:
def canvas(self): ...

with pytest.raises(
AttributeError,
match=f"Could not find a renderer for the '{backend}' backend. Please raise an issue",
):
_get_renderer(FakeFig())
Loading