Skip to content

Commit

Permalink
Test that typo in attribute name raises exception
Browse files Browse the repository at this point in the history
  • Loading branch information
sgdecker committed Oct 25, 2021
1 parent 14912fd commit 03d46dd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/plots/test_declarative.py
Original file line number Diff line number Diff line change
Expand Up @@ -1668,3 +1668,11 @@ def test_drop_traitlets_dir():
assert not dir(plot_obj())[0].startswith('_')
assert 'cross_validation_lock' in dir(plot_obj)
assert 'cross_validation_lock' not in dir(plot_obj())


@needs_cartopy
def test_attribute_error():
"""Test that a mistyped attribute name raises an exception."""
with pytest.raises(AttributeError):
panel = MapPanel()
panel.pots = []

0 comments on commit 03d46dd

Please sign in to comment.