1313from  tests .utils  import  ConstructorEager 
1414from  tests .utils  import  assert_equal_data 
1515
16+ xfail_hist  =  pytest .mark .xfail (
17+     reason = "https://github.com/narwhals-dev/narwhals/issues/2348" , strict = False 
18+ )
19+ 
20+ 
1621data  =  {
1722    "int" : [0 , 1 , 2 , 3 , 4 , 5 , 6 ],
1823}
7681]
7782
7883
84+ @xfail_hist  
7985@pytest .mark .parametrize ("params" , bins_and_expected ) 
8086@pytest .mark .parametrize ("include_breakpoint" , [True , False ]) 
8187@pytest .mark .filterwarnings ( 
@@ -161,6 +167,7 @@ def test_hist_bin(
161167        assert_equal_data (result , expected )
162168
163169
170+ @xfail_hist  
164171@pytest .mark .parametrize ("params" , counts_and_expected ) 
165172@pytest .mark .parametrize ("include_breakpoint" , [True , False ]) 
166173@pytest .mark .filterwarnings ( 
@@ -232,6 +239,7 @@ def test_hist_count(
232239            )
233240
234241
242+ @xfail_hist  
235243@pytest .mark .filterwarnings ( 
236244    "ignore:`Series.hist` is being called from the stable API although considered an unstable feature."  
237245) 
@@ -268,6 +276,7 @@ def test_hist_count_no_spread(
268276    assert_equal_data (result , expected )
269277
270278
279+ @xfail_hist  
271280@pytest .mark .filterwarnings ( 
272281    "ignore:`Series.hist` is being called from the stable API although considered an unstable feature."  
273282) 
@@ -283,6 +292,7 @@ def test_hist_bin_and_bin_count() -> None:
283292        s .hist (bins = [1 , 3 ], bin_count = 4 )
284293
285294
295+ @xfail_hist  
286296@pytest .mark .filterwarnings ( 
287297    "ignore:`Series.hist` is being called from the stable API although considered an unstable feature."  
288298) 
@@ -331,6 +341,7 @@ def test_hist_small_bins(
331341        s ["values" ].hist (bins = [1 , 3 ], bin_count = 4 )
332342
333343
344+ @xfail_hist  
334345@pytest .mark .filterwarnings ( 
335346    "ignore:`Series.hist` is being called from the stable API although considered an unstable feature."  
336347) 
@@ -365,6 +376,7 @@ def test_hist_non_monotonic(constructor_eager: ConstructorEager) -> None:
365376        st .floats (min_value = 0.001 , max_value = 1_000 , allow_nan = False ), max_size = 50  
366377    ), 
367378) 
379+ @xfail_hist  
368380@pytest .mark .filterwarnings ( 
369381    "ignore:`Series.hist` is being called from the stable API although considered an unstable feature." , 
370382    "ignore:invalid value encountered in cast:RuntimeWarning" , 
@@ -421,6 +433,7 @@ def test_hist_bin_hypotheis(
421433    ), 
422434    bin_count = st .integers (min_value = 0 , max_value = 1_000 ), 
423435) 
436+ @xfail_hist  
424437@pytest .mark .skipif ( 
425438    POLARS_VERSION  <  (1 , 15 ), 
426439    reason = "hist(bin_count=...) behavior significantly changed after this version" , 
0 commit comments