mirror of
https://github.com/affaan-m/ECC.git
synced 2026-10-26 18:35:05 +00:00
fix(integration): address reviewer portability and guidance
This commit is contained in:
4 files changed
+7
-3
No files matched your search
@@ -281,6 +281,7 @@ def test_parse_confidence_preserves_valid_range(confidence):
|
||||
assert parse_instinct_file(content)[0]["confidence"] == confidence
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
@pytest.mark.parametrize("value", [
|
||||
"line one\nline two", "tab\tvalue", "carriage\rreturn",
|
||||
'when writing "quoted" text', r"C:\Users\name", "caf\u00e9",
|
||||
@@ -294,11 +295,13 @@ def test_quoted_instinct_strings_roundtrip(value: str) -> None:
|
||||
assert instincts[0]["trigger"] == value
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_parse_quoted_instinct_decodes_newline_escape() -> None:
|
||||
content = '---\nid: newline\ntrigger: "line one\\nline two"\n---\nBody'
|
||||
assert parse_instinct_file(content)[0]["trigger"] == "line one\nline two"
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
@pytest.mark.parametrize("value", ["line\u0085value", "line\u0090value"])
|
||||
def test_unicode_controls_are_escaped_for_yaml(value: str) -> None:
|
||||
quoted = _mod._yaml_quote(value)
|
||||
@@ -306,6 +309,7 @@ def test_unicode_controls_are_escaped_for_yaml(value: str) -> None:
|
||||
assert json.loads(quoted) == value
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_parse_quoted_instinct_preserves_legacy_escape() -> None:
|
||||
content = '---\nid: legacy\ntrigger: "C:\\projects"\n---\nBody'
|
||||
assert parse_instinct_file(content)[0]["trigger"] == r"C:\projects"
|
||||
|
||||
Reference in new issue
Block a user