Skip to content

Commit 4066ae2

Browse files
Test single property key guessing
1 parent 20518c1 commit 4066ae2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Diff for: packages/python/plotly/plotly/tests/test_core/test_errors/test_dict_path_errors.py

+10
Original file line numberDiff line numberDiff line change
@@ -646,3 +646,13 @@ def _raise_bad_property_path_real():
646646
],
647647
)
648648
check_error_string(_raise_bad_property_path_real, ValueError, correct_err_str, [])
649+
650+
651+
def test_single_prop_path_key_guess(some_fig):
652+
raised = False
653+
try:
654+
some_fig.layout.shapes[0]["typ"] = "sandwich"
655+
except ValueError as e:
656+
raised = True
657+
assert e.args[0].find('Did you mean "type"?') >= 0
658+
assert raised

0 commit comments

Comments
 (0)