diff --git a/pandas/tests/test_sorting.py b/pandas/tests/test_sorting.py index d32c72b3df974..374944a4e17c9 100644 --- a/pandas/tests/test_sorting.py +++ b/pandas/tests/test_sorting.py @@ -1,10 +1,13 @@ from collections import defaultdict from datetime import datetime from itertools import product +import os import numpy as np import pytest +from pandas.compat import is_platform_windows + from pandas import ( DataFrame, MultiIndex, @@ -424,6 +427,11 @@ def test_codes(self, verify, codes, exp_codes, na_sentinel): tm.assert_numpy_array_equal(result, expected) tm.assert_numpy_array_equal(result_codes, expected_codes) + @pytest.mark.skipif( + is_platform_windows() and os.environ.get("PANDAS_CI", "0") == "1", + reason="In CI environment can crash thread with: " + "Windows fatal exception: access violation", + ) @pytest.mark.parametrize("na_sentinel", [-1, 99]) def test_codes_out_of_bound(self, na_sentinel): values = [3, 1, 2, 0, 4]