Skip to content

Commit 7651c08

Browse files
authored
TST: Skip flaky, crashing test in Windows (#45786)
* TST: Skip flaky, crashing test in Windows * Add CI check
1 parent 3034cfb commit 7651c08

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tests/test_sorting.py

+8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
from collections import defaultdict
22
from datetime import datetime
33
from itertools import product
4+
import os
45

56
import numpy as np
67
import pytest
78

9+
from pandas.compat import is_platform_windows
10+
811
from pandas import (
912
DataFrame,
1013
MultiIndex,
@@ -424,6 +427,11 @@ def test_codes(self, verify, codes, exp_codes, na_sentinel):
424427
tm.assert_numpy_array_equal(result, expected)
425428
tm.assert_numpy_array_equal(result_codes, expected_codes)
426429

430+
@pytest.mark.skipif(
431+
is_platform_windows() and os.environ.get("PANDAS_CI", "0") == "1",
432+
reason="In CI environment can crash thread with: "
433+
"Windows fatal exception: access violation",
434+
)
427435
@pytest.mark.parametrize("na_sentinel", [-1, 99])
428436
def test_codes_out_of_bound(self, na_sentinel):
429437
values = [3, 1, 2, 0, 4]

0 commit comments

Comments
 (0)