@@ -16,7 +16,7 @@ def test_validate_colors(self):
16
16
"Plotly scale, an rgb color or a hex color."
17
17
)
18
18
19
- self .assertRaisesRegexp (
19
+ self .assertRaisesRegex (
20
20
PlotlyError , pattern , colors .validate_colors , color_string
21
21
)
22
22
@@ -27,7 +27,7 @@ def test_validate_colors(self):
27
27
"Whoops! The elements in your rgb colors tuples cannot " "exceed 255.0."
28
28
)
29
29
30
- self .assertRaisesRegexp (
30
+ self .assertRaisesRegex (
31
31
PlotlyError , pattern2 , colors .validate_colors , color_string2
32
32
)
33
33
@@ -36,7 +36,7 @@ def test_validate_colors(self):
36
36
37
37
pattern3 = "Whoops! The elements in your colors tuples cannot " "exceed 1.0."
38
38
39
- self .assertRaisesRegexp (
39
+ self .assertRaisesRegex (
40
40
PlotlyError , pattern3 , colors .validate_colors , color_tuple
41
41
)
42
42
@@ -56,7 +56,7 @@ def test_convert_colors_to_same_type(self):
56
56
57
57
pattern2 = "You must select either rgb or tuple for your colortype " "variable."
58
58
59
- self .assertRaisesRegexp (
59
+ self .assertRaisesRegex (
60
60
PlotlyError ,
61
61
pattern2 ,
62
62
colors .convert_colors_to_same_type ,
@@ -72,7 +72,7 @@ def test_convert_dict_colors_to_same_type(self):
72
72
73
73
pattern = "You must select either rgb or tuple for your colortype " "variable."
74
74
75
- self .assertRaisesRegexp (
75
+ self .assertRaisesRegex (
76
76
PlotlyError ,
77
77
pattern ,
78
78
colors .convert_dict_colors_to_same_type ,
@@ -89,7 +89,7 @@ def test_validate_scale_values(self):
89
89
"You must input a list of scale values that has at least " "two values."
90
90
)
91
91
92
- self .assertRaisesRegexp (
92
+ self .assertRaisesRegex (
93
93
PlotlyError , pattern , colors .validate_scale_values , scale
94
94
)
95
95
@@ -101,7 +101,7 @@ def test_validate_scale_values(self):
101
101
"1.0 respectively."
102
102
)
103
103
104
- self .assertRaisesRegexp (
104
+ self .assertRaisesRegex (
105
105
PlotlyError , pattern , colors .validate_scale_values , scale
106
106
)
107
107
@@ -113,7 +113,7 @@ def test_validate_scale_values(self):
113
113
"increasing sequence of numbers."
114
114
)
115
115
116
- self .assertRaisesRegexp (
116
+ self .assertRaisesRegex (
117
117
PlotlyError , pattern , colors .validate_scale_values , scale
118
118
)
119
119
@@ -124,17 +124,15 @@ def test_make_colorscale(self):
124
124
125
125
pattern = "You must input a list of colors that has at least two colors."
126
126
127
- self .assertRaisesRegexp (
128
- PlotlyError , pattern , colors .make_colorscale , color_list
129
- )
127
+ self .assertRaisesRegex (PlotlyError , pattern , colors .make_colorscale , color_list )
130
128
131
129
# test length of colors and scale
132
130
color_list2 = [(0 , 0 , 0 ), (1 , 1 , 1 )]
133
131
scale = [0 ]
134
132
135
133
pattern2 = "The length of colors and scale must be the same."
136
134
137
- self .assertRaisesRegexp (
135
+ self .assertRaisesRegex (
138
136
PlotlyError , pattern2 , colors .make_colorscale , color_list2 , scale
139
137
)
140
138
@@ -144,7 +142,7 @@ def test_get_colorscale(self):
144
142
pattern = "Name argument have to be a string."
145
143
name = colors .sequential .haline
146
144
147
- self .assertRaisesRegexp (PlotlyError , pattern , colors .get_colorscale , name )
145
+ self .assertRaisesRegex (PlotlyError , pattern , colors .get_colorscale , name )
148
146
149
147
# test for non-existing colorscale
150
148
pattern = r"Colorscale \S+ is not a built-in scale."
0 commit comments