@@ -431,6 +431,9 @@ def _flaky_replace(src, dst):
431431 pytest .param ({"pre_include" : "stdint.h" }, id = "pre_include" ),
432432 pytest .param ({"pch" : True }, id = "pch" ),
433433 pytest .param ({"pch_dir" : "pch-cache" }, id = "pch_dir" ),
434+ # Non-list/tuple Sequence: the compiler iterates it via ``is_sequence``
435+ # (``isinstance(v, Sequence)``), so the guard must too.
436+ pytest .param ({"include_path" : range (1 )}, id = "include_path_nonempty_range" ),
434437 # Empty-string path-like options -- NVRTC still emits a flag
435438 # (``--use-pch=``, ``--pch-dir=``, ``--pre-include=``) so the guard
436439 # must fire for them too.
@@ -466,6 +469,10 @@ def test_make_program_cache_key_rejects_external_content_without_extra_digest(op
466469 # is silently ignored at compile time and must not trip the guard.
467470 pytest .param ({"include_path" : False }, id = "include_path_false" ),
468471 pytest .param ({"pre_include" : False }, id = "pre_include_false" ),
472+ # Empty non-list/tuple Sequence: ``_prepare_nvrtc_options_impl`` uses
473+ # ``is_sequence`` (i.e. ``isinstance(v, Sequence)``); a zero-length
474+ # sequence produces no emission regardless of type.
475+ pytest .param ({"include_path" : range (0 )}, id = "include_path_empty_range" ),
469476 ],
470477)
471478def test_make_program_cache_key_accepts_empty_external_content (option_kw ):
0 commit comments