TST: Skip flaky, crashing test in Windows (#45786) · pandas-dev/pandas@7651c08 (original) (raw)

1

1

`from collections import defaultdict

`

2

2

`from datetime import datetime

`

3

3

`from itertools import product

`

``

4

`+

import os

`

4

5

``

5

6

`import numpy as np

`

6

7

`import pytest

`

7

8

``

``

9

`+

from pandas.compat import is_platform_windows

`

``

10

+

8

11

`from pandas import (

`

9

12

`DataFrame,

`

10

13

`MultiIndex,

`

`@@ -424,6 +427,11 @@ def test_codes(self, verify, codes, exp_codes, na_sentinel):

`

424

427

`tm.assert_numpy_array_equal(result, expected)

`

425

428

`tm.assert_numpy_array_equal(result_codes, expected_codes)

`

426

429

``

``

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

`+

)

`

427

435

`@pytest.mark.parametrize("na_sentinel", [-1, 99])

`

428

436

`def test_codes_out_of_bound(self, na_sentinel):

`

429

437

`values = [3, 1, 2, 0, 4]

`