File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -1448,15 +1448,17 @@ def test_value_counts_series(self):
14481448
14491449 def test_value_counts_stability (self ):
14501450 # GH 63155
1451- arr = np .random .default_rng (2 ).integers (0 , 128 , 8192 )
1451+ arr = np .random .default_rng (2 ).integers (0 , 16 , 64 )
14521452 result = algos .value_counts_internal (arr , sort = True )
1453- expected = (
1454- Series (arr )
1455- .value_counts (sort = False )
1456- .sort_values (ascending = False , kind = "stable" )
1457- )
1453+
1454+ value_counts = Series (arr ).value_counts (sort = False )
1455+ expected = value_counts .sort_values (ascending = False , kind = "stable" )
14581456 tm .assert_series_equal (result , expected )
14591457
1458+ unstable_sorted = value_counts .sort_values (ascending = False , kind = "quicksort" )
1459+ with pytest .raises (AssertionError ):
1460+ tm .assert_series_equal (result , unstable_sorted )
1461+
14601462
14611463class TestDuplicated :
14621464 def test_duplicated_with_nas (self ):
You can’t perform that action at this time.
0 commit comments