Skip to content

Commit bae0483

Browse files
author
Joseph Damiba
committed
add test for permissive defaults
1 parent 633c2da commit bae0483

File tree

1 file changed

+8
-0
lines changed
  • packages/python/plotly/plotly/tests/test_core/test_px

1 file changed

+8
-0
lines changed

packages/python/plotly/plotly/tests/test_core/test_px/test_px.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import plotly.express as px
22
import numpy as np
3+
import pytest
4+
35

46

57
def test_scatter():
@@ -232,3 +234,9 @@ def assert_orderings(days_order, days_check, times_order, times_check):
232234
for days in permutations(df["day"].unique()):
233235
for times in permutations(df["time"].unique()):
234236
assert_orderings(days, days, times, times)
237+
238+
def check_permissive_defaults():
239+
msg = "AttributeError: 'PxDefaults' object has no attribute 'should_not_work'"
240+
with pytest.raises(AttributeError, match=msg):
241+
px.defaults.should_not_work = "test"
242+

0 commit comments

Comments
 (0)