From 37c7ed6218c3a49cc57f423a53d3a49a7777730d Mon Sep 17 00:00:00 2001 From: KeshavAnandCode Date: Tue, 19 May 2026 17:31:02 -0500 Subject: [PATCH] fixed broken test --- tests/test_pack.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/test_pack.py b/tests/test_pack.py index b561d45..e656588 100644 --- a/tests/test_pack.py +++ b/tests/test_pack.py @@ -100,15 +100,15 @@ def test_builtins_and_exceptions_integrity(pack_data): def test_postfix_keywords_integrity(pack_data): path, data = pack_data - assert ( - "postfix_keywords" in data - ), f"Missing 'postfix_keywords' section in {path.name}" - assert isinstance( - data["postfix_keywords"], list - ), "'postfix_keywords' must be an array/list" - - # Ensure any declared postfix keyword is actually registered in the main keywords dictionary + assert "postfix_keywords" in data, f"Missing 'postfix_keywords' section in {path.name}" + assert isinstance(data["postfix_keywords"], list), "'postfix_keywords' must be an array/list" + + # Extract all the English Python keywords that have been mapped in this pack + mapped_python_targets = set(data["keywords"].values()) + + # Ensure any declared English postfix keyword actually has a mapped translation for post_kw in data["postfix_keywords"]: - assert ( - post_kw in data["keywords"] - ), f"Postfix keyword '{post_kw}' is missing from the main 'keywords' mapping in {path.name}." + assert post_kw in mapped_python_targets, ( + f"English postfix keyword '{post_kw}' is missing from the mapped values " + f"in the main 'keywords' dictionary in {path.name}." + ) \ No newline at end of file