@@ -102,10 +102,10 @@ def test_labels(constructor):
102102)
103103def test_line_mode (constructor , extra_kwargs , expected_mode ):
104104 data = px .data .gapminder ().to_dict (orient = "list" )
105- gapminder = nw . from_native ( constructor (data ) )
105+ gapminder = constructor (data )
106106
107107 fig = px .line (
108- gapminder . to_native () ,
108+ gapminder ,
109109 x = "year" ,
110110 y = "pop" ,
111111 color = "country" ,
@@ -119,7 +119,7 @@ def test_px_templates(constructor):
119119 import plotly .graph_objects as go
120120
121121 data = px .data .tips ().to_dict (orient = "list" )
122- tips = nw . from_native ( constructor (data ) )
122+ tips = constructor (data )
123123
124124 # use the normal defaults
125125 fig = px .scatter ()
@@ -146,7 +146,7 @@ def test_px_templates(constructor):
146146
147147 # read colorway from the template
148148 fig = px .scatter (
149- tips . to_native () ,
149+ tips ,
150150 x = "total_bill" ,
151151 y = "tip" ,
152152 color = "sex" ,
@@ -156,23 +156,21 @@ def test_px_templates(constructor):
156156 assert fig .data [1 ].marker .color == "blue"
157157
158158 # default colorway fallback
159- fig = px .scatter (
160- tips .to_native (), x = "total_bill" , y = "tip" , color = "sex" , template = dict ()
161- )
159+ fig = px .scatter (tips , x = "total_bill" , y = "tip" , color = "sex" , template = dict ())
162160 assert fig .data [0 ].marker .color == px .colors .qualitative .D3 [0 ]
163161 assert fig .data [1 ].marker .color == px .colors .qualitative .D3 [1 ]
164162
165163 # pio default template colorway fallback
166164 pio .templates .default = "seaborn"
167165 px .defaults .template = None
168- fig = px .scatter (tips . to_native () , x = "total_bill" , y = "tip" , color = "sex" )
166+ fig = px .scatter (tips , x = "total_bill" , y = "tip" , color = "sex" )
169167 assert fig .data [0 ].marker .color == pio .templates ["seaborn" ].layout .colorway [0 ]
170168 assert fig .data [1 ].marker .color == pio .templates ["seaborn" ].layout .colorway [1 ]
171169
172170 # pio default template colorway fallback
173171 pio .templates .default = "seaborn"
174172 px .defaults .template = "ggplot2"
175- fig = px .scatter (tips . to_native () , x = "total_bill" , y = "tip" , color = "sex" )
173+ fig = px .scatter (tips , x = "total_bill" , y = "tip" , color = "sex" )
176174 assert fig .data [0 ].marker .color == pio .templates ["ggplot2" ].layout .colorway [0 ]
177175 assert fig .data [1 ].marker .color == pio .templates ["ggplot2" ].layout .colorway [1 ]
178176
@@ -190,7 +188,7 @@ def test_px_templates(constructor):
190188 pio .templates .default = "none"
191189 px .defaults .template = None
192190 fig = px .scatter (
193- tips . to_native () ,
191+ tips ,
194192 x = "total_bill" ,
195193 y = "tip" ,
196194 marginal_x = "histogram" ,
@@ -202,7 +200,7 @@ def test_px_templates(constructor):
202200 assert fig .layout .yaxis3 .showgrid
203201
204202 fig = px .scatter (
205- tips . to_native () ,
203+ tips ,
206204 x = "total_bill" ,
207205 y = "tip" ,
208206 marginal_x = "histogram" ,
@@ -215,7 +213,7 @@ def test_px_templates(constructor):
215213 assert fig .layout .yaxis3 .showgrid is None
216214
217215 fig = px .scatter (
218- tips . to_native () ,
216+ tips ,
219217 x = "total_bill" ,
220218 y = "tip" ,
221219 marginal_x = "histogram" ,
@@ -306,9 +304,9 @@ def test_permissive_defaults():
306304
307305def test_marginal_ranges (constructor ):
308306 data = px .data .tips ().to_dict (orient = "list" )
309- df = nw . from_native ( constructor (data ) )
307+ df = constructor (data )
310308 fig = px .scatter (
311- df . to_native () ,
309+ df ,
312310 x = "total_bill" ,
313311 y = "tip" ,
314312 marginal_x = "histogram" ,
0 commit comments