Skip to content

Commit 1e66038

Browse files
Liam-DeVoeZac-HD
authored andcommitted
xfail cached_charmap test on pyodide
1 parent 4ab820e commit 1e66038

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

hypothesis-python/tests/cover/test_charmap.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
import unicodedata
1616
from typing import get_args
1717

18+
import pytest
19+
1820
from hypothesis import given, strategies as st
1921
from hypothesis.internal import charmap as cm
2022
from hypothesis.internal.intervalsets import IntervalSet
@@ -91,6 +93,23 @@ def test_recreate_charmap():
9193
assert x == y
9294

9395

96+
# This test fails flakily (every 1 in ~10 full CI runs), but only on the test-pyodide
97+
# ci job:
98+
#
99+
# os.utime(cm.charmap_file(), (mtime, mtime))
100+
# ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
101+
# FileNotFoundError: [Errno 44] No such file or directory:
102+
# '/home/runner/work/hypothesis/hypothesis/.hypothesis/unicode_data/15.1.0/charmap.json.gz'
103+
#
104+
# I suspect this is from a race condition due to how we parallelize the pyodide
105+
# tests in CI, (splitting test files across 20 processes). It's also possible
106+
# it's from some pyodide-specific weirdness, but since the test only fails sometimes,
107+
# I find this less likely.
108+
#
109+
# I'm xfailing this on emscripten for now, to get a consistent green CI.
110+
@pytest.mark.xfail(
111+
condition=sys.platform == "emscripten", strict=False, reason="see comment"
112+
)
94113
@skipif_threading
95114
def test_uses_cached_charmap():
96115
cm.charmap()

0 commit comments

Comments
 (0)