@@ -292,16 +292,20 @@ def __dataframe__(self) -> None: # pragma: no cover
292292 assert result is mockdf
293293
294294
295- def test_from_native_altair_array_like () -> None :
295+ def test_from_native_strict_native_series () -> None :
296296 obj : list [int ] = [1 , 2 , 3 , 4 ]
297297 array_like = cast ("Iterable[Any]" , obj )
298298 not_array_like : Literal [1 ] = 1
299+ np_array = pl .Series (obj ).to_numpy ()
299300
300301 with pytest .raises (TypeError , match = "got.+list" ):
301- false_positive_native_series = nw .from_native (obj , series_only = True ) # noqa: F841
302+ nw .from_native (obj , series_only = True ) # type: ignore[call-overload]
302303
303304 with pytest .raises (TypeError , match = "got.+list" ):
304- true_negative_iterable = nw .from_native (array_like , series_only = True ) # type: ignore[call-overload] # noqa: F841
305+ nw .from_native (array_like , series_only = True ) # type: ignore[call-overload]
305306
306307 with pytest .raises (TypeError , match = "got.+int" ):
307- true_negative_not_native_series = nw .from_native (not_array_like , series_only = True ) # type: ignore[call-overload] # noqa: F841
308+ nw .from_native (not_array_like , series_only = True ) # type: ignore[call-overload]
309+
310+ with pytest .raises (TypeError , match = "got.+numpy.ndarray" ):
311+ nw .from_native (np_array , series_only = True ) # type: ignore[call-overload]
0 commit comments