From 03d46dd80baa7b18b5c4dd622c2f2c80dcee1e1f Mon Sep 17 00:00:00 2001 From: Steve Decker Date: Mon, 25 Oct 2021 10:14:55 -0400 Subject: [PATCH] Test that typo in attribute name raises exception --- tests/plots/test_declarative.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/plots/test_declarative.py b/tests/plots/test_declarative.py index f31c1405007..f2af7484686 100644 --- a/tests/plots/test_declarative.py +++ b/tests/plots/test_declarative.py @@ -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 = []