Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 861a325

Browse files
committed
Prevent hypothesis from creating a lone Unicode surrogate character for fuzz file
1 parent ac7b6c8 commit 861a325

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

engine/e2e-test/api/files/test_api_create_file.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,18 @@ def test_api_create_file_very_large_file(self, tmp_path):
312312
)
313313

314314
fuzzy_filenames = st.text(
315-
alphabet=st.characters(min_codepoint=1, max_codepoint=0xFFFF, blacklist_characters='\\/\0'),
316-
min_size=1, max_size=255
315+
alphabet=st.characters(
316+
min_codepoint=1,
317+
max_codepoint=0x10FFFF, # New: Full range including Supplementary Planes
318+
319+
blacklist_categories=(
320+
'Cs',
321+
'Cc',
322+
),
323+
blacklist_characters='\\/\0'
324+
),
325+
min_size=1,
326+
max_size=255 # Common filesystem limit
317327
)
318328

319329
@HYPOTHESIS_SETTINGS

0 commit comments

Comments
 (0)