Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f2018c83b | |||
| 94f989c282 | |||
| 37c7ed6218 |
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "foreignthon-es"
|
name = "foreignthon-es"
|
||||||
version = "0.3.1"
|
version = "0.3.2"
|
||||||
description = "Spanish language pack for ForeignThon."
|
description = "Spanish language pack for ForeignThon."
|
||||||
license = { text = "GPL v3" }
|
license = { text = "GPL v3" }
|
||||||
requires-python = ">=3.9"
|
requires-python = ">=3.9"
|
||||||
@@ -16,6 +16,16 @@ keywords = ["foreignthon", "spanish", "español"]
|
|||||||
|
|
||||||
dependencies = ["foreignthon>=0.5.3"]
|
dependencies = ["foreignthon>=0.5.3"]
|
||||||
|
|
||||||
|
classifiers = [
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
||||||
|
"Operating System :: OS Independent",
|
||||||
|
"Topic :: Software Development :: Compilers",
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Homepage = "https://git.keshavanand.net/foreign-thon/foreignthon-ta"
|
||||||
|
|
||||||
[project.entry-points."foreignthon.langs"]
|
[project.entry-points."foreignthon.langs"]
|
||||||
es = "foreignthon_es"
|
es = "foreignthon_es"
|
||||||
|
|
||||||
|
|||||||
@@ -100,15 +100,15 @@ def test_builtins_and_exceptions_integrity(pack_data):
|
|||||||
|
|
||||||
def test_postfix_keywords_integrity(pack_data):
|
def test_postfix_keywords_integrity(pack_data):
|
||||||
path, data = pack_data
|
path, data = pack_data
|
||||||
assert (
|
assert "postfix_keywords" in data, f"Missing 'postfix_keywords' section in {path.name}"
|
||||||
"postfix_keywords" in data
|
assert isinstance(data["postfix_keywords"], list), "'postfix_keywords' must be an array/list"
|
||||||
), f"Missing 'postfix_keywords' section in {path.name}"
|
|
||||||
assert isinstance(
|
# Extract all the English Python keywords that have been mapped in this pack
|
||||||
data["postfix_keywords"], list
|
mapped_python_targets = set(data["keywords"].values())
|
||||||
), "'postfix_keywords' must be an array/list"
|
|
||||||
|
# Ensure any declared English postfix keyword actually has a mapped translation
|
||||||
# Ensure any declared postfix keyword is actually registered in the main keywords dictionary
|
|
||||||
for post_kw in data["postfix_keywords"]:
|
for post_kw in data["postfix_keywords"]:
|
||||||
assert (
|
assert post_kw in mapped_python_targets, (
|
||||||
post_kw in data["keywords"]
|
f"English postfix keyword '{post_kw}' is missing from the mapped values "
|
||||||
), f"Postfix keyword '{post_kw}' is missing from the main 'keywords' mapping in {path.name}."
|
f"in the main 'keywords' dictionary in {path.name}."
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user