File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
packages/python/plotly/plotly/tests/test_core/test_subplots Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -115,17 +115,20 @@ def test_row_width_not_list_of_correct_numbers(self):
115
115
tls .make_subplots (rows = 2 , cols = 2 , row_heights = [1 ])
116
116
117
117
def test_bad_row_spacing (self ):
118
- with self .assertRaisesRegex (
119
- ValueError , "Vertical spacing must be less than or equal to 1 / (rows - 1)."
120
- ):
118
+ with self .assertRaises (ValueError ) as cm :
121
119
tls .make_subplots (rows = 3 , vertical_spacing = 1 / 2 + 1e-6 )
120
+ assert (
121
+ cm .exception .args [0 ]
122
+ == "Vertical spacing must be less than or equal to 1 / (rows - 1)."
123
+ )
122
124
123
125
def test_bad_col_spacing (self ):
124
- with self .assertRaisesRegex (
125
- ValueError ,
126
- "Horizontal spacing must be less than or equal to 1 / (cols - 1)." ,
127
- ):
126
+ with self .assertRaises (ValueError ) as cm :
128
127
tls .make_subplots (cols = 3 , horizontal_spacing = 1 / 2 + 1e-6 )
128
+ assert (
129
+ cm .exception .args [0 ]
130
+ == "Horizontal spacing must be less than or equal to 1 / (cols - 1)."
131
+ )
129
132
130
133
def test_single_plot (self ):
131
134
expected = Figure (
You can’t perform that action at this time.
0 commit comments