Pull the `*[!...]*` glob portion of a real case arm out of _PYTHON_DETECT by a unique anchor, so tests run against the emitted text, not a copy.
(marker: str)
| 1009 | |
| 1010 | |
| 1011 | def _extract_case_pattern(marker: str) -> str: |
| 1012 | """Pull the `*[!...]*` glob portion of a real case arm out of _PYTHON_DETECT |
| 1013 | by a unique anchor, so tests run against the emitted text, not a copy.""" |
| 1014 | from graphify.hooks import _PYTHON_DETECT |
| 1015 | for line in _PYTHON_DETECT.splitlines(): |
| 1016 | if marker in line: |
| 1017 | return line.strip().split(")")[0] |
| 1018 | raise AssertionError(f"case arm containing {marker!r} not found in _PYTHON_DETECT") |
| 1019 | |
| 1020 | |
| 1021 | def _sh_single_quote(value: str) -> str: |
no outgoing calls
no test coverage detected