From 126a412ed3d4917da3e337078532d685f761a7dc Mon Sep 17 00:00:00 2001 From: dvd7587 Date: Tue, 1 Mar 2022 09:34:18 +0100 Subject: [PATCH 1/3] Add validators test --- .../plotly/tests/test_core/test_validators/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 packages/python/plotly/plotly/tests/test_core/test_validators/__init__.py diff --git a/packages/python/plotly/plotly/tests/test_core/test_validators/__init__.py b/packages/python/plotly/plotly/tests/test_core/test_validators/__init__.py new file mode 100644 index 00000000000..e1565c83f71 --- /dev/null +++ b/packages/python/plotly/plotly/tests/test_core/test_validators/__init__.py @@ -0,0 +1,5 @@ +import warnings + + +def setup_package(): + warnings.filterwarnings("ignore") From 9f87a87cc155ec028d2f005c24b7e1f89c24882a Mon Sep 17 00:00:00 2001 From: dvd7587 Date: Tue, 1 Mar 2022 09:37:56 +0100 Subject: [PATCH 2/3] Add test validators --- .../test_core/test_validators/test_validators.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 packages/python/plotly/plotly/tests/test_core/test_validators/test_validators.py diff --git a/packages/python/plotly/plotly/tests/test_core/test_validators/test_validators.py b/packages/python/plotly/plotly/tests/test_core/test_validators/test_validators.py new file mode 100644 index 00000000000..855a47a4d9d --- /dev/null +++ b/packages/python/plotly/plotly/tests/test_core/test_validators/test_validators.py @@ -0,0 +1,11 @@ + +from __future__ import absolute_import + +from unittest import TestCase +import plotly.graph_objs as go + + +class TestValidators(TestCase): + def test_layout_shape_line_dash_validator(self): + # regression from issue #3375 + go.layout.shape.Line(color='black', width=2, dash='5px,3px,3px,2px') From 1af3ca99884981c38fb49f4be40230f5f15c5fe6 Mon Sep 17 00:00:00 2001 From: dvd7587 Date: Tue, 1 Mar 2022 09:43:48 +0100 Subject: [PATCH 3/3] Fix go.layout.shape.line.DashValidator #3375 --- .../python/plotly/plotly/validators/layout/shape/line/_dash.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/python/plotly/plotly/validators/layout/shape/line/_dash.py b/packages/python/plotly/plotly/validators/layout/shape/line/_dash.py index 4b42018c816..77766d5540b 100644 --- a/packages/python/plotly/plotly/validators/layout/shape/line/_dash.py +++ b/packages/python/plotly/plotly/validators/layout/shape/line/_dash.py @@ -1,7 +1,7 @@ import _plotly_utils.basevalidators -class DashValidator(_plotly_utils.basevalidators.StringValidator): +class DashValidator(_plotly_utils.basevalidators.DashValidator): def __init__(self, plotly_name="dash", parent_name="layout.shape.line", **kwargs): super(DashValidator, self).__init__( plotly_name=plotly_name,