44
55from agr .skill import (
66 SKILL_MARKER ,
7- _is_excluded_skill_path ,
7+ _is_excluded_resource_path ,
88 create_skill_scaffold ,
99 discover_skills_in_repo_listing ,
1010 find_skill_in_repo ,
@@ -428,41 +428,41 @@ def test_excludes_root_and_excluded_dirs(self):
428428 assert result ["commit" ].as_posix () == "skills/commit"
429429
430430
431- class TestIsExcludedSkillPath :
432- """Tests for _is_excluded_skill_path — the shared exclusion predicate."""
431+ class TestIsExcludedResourcePath :
432+ """Tests for _is_excluded_resource_path — the shared exclusion predicate."""
433433
434434 def test_root_level_skill_md_excluded (self ):
435435 """A single-component path (root SKILL.md) is excluded."""
436- assert _is_excluded_skill_path (("SKILL.md" ,)) is True
436+ assert _is_excluded_resource_path (("SKILL.md" ,)) is True
437437
438438 def test_nested_skill_md_not_excluded (self ):
439439 """A normal skill path like skills/my-skill/SKILL.md is included."""
440- assert _is_excluded_skill_path (("skills" , "my-skill" , "SKILL.md" )) is False
440+ assert _is_excluded_resource_path (("skills" , "my-skill" , "SKILL.md" )) is False
441441
442442 def test_git_dir_excluded (self ):
443443 """Paths under .git are excluded."""
444- assert _is_excluded_skill_path ((".git" , "hooks" , "SKILL.md" )) is True
444+ assert _is_excluded_resource_path ((".git" , "hooks" , "SKILL.md" )) is True
445445
446446 def test_node_modules_excluded (self ):
447447 """Paths under node_modules are excluded."""
448- assert _is_excluded_skill_path (("node_modules" , "pkg" , "SKILL.md" )) is True
448+ assert _is_excluded_resource_path (("node_modules" , "pkg" , "SKILL.md" )) is True
449449
450450 def test_pycache_excluded (self ):
451451 """Paths under __pycache__ are excluded."""
452- assert _is_excluded_skill_path (("__pycache__" , "my-skill" , "SKILL.md" )) is True
452+ assert _is_excluded_resource_path (("__pycache__" , "my-skill" , "SKILL.md" )) is True
453453
454454 def test_venv_excluded (self ):
455455 """Paths under .venv are excluded."""
456- assert _is_excluded_skill_path ((".venv" , "lib" , "SKILL.md" )) is True
456+ assert _is_excluded_resource_path ((".venv" , "lib" , "SKILL.md" )) is True
457457
458458 def test_build_dir_excluded (self ):
459459 """Paths under build/ are excluded."""
460- assert _is_excluded_skill_path (("build" , "output" , "SKILL.md" )) is True
460+ assert _is_excluded_resource_path (("build" , "output" , "SKILL.md" )) is True
461461
462462 def test_excluded_dir_deep_in_path (self ):
463463 """An excluded dir anywhere in the path triggers exclusion."""
464464 assert (
465- _is_excluded_skill_path (("a" , "b" , "node_modules" , "c" , "SKILL.md" )) is True
465+ _is_excluded_resource_path (("a" , "b" , "node_modules" , "c" , "SKILL.md" )) is True
466466 )
467467
468468 def test_skill_named_as_excluded_dir_not_excluded (self ):
@@ -473,16 +473,16 @@ def test_skill_named_as_excluded_dir_not_excluded(self):
473473 legitimate skill named "build", not a build artifact.
474474 """
475475 # "build" is the skill directory (parts[-2]), "skills" is an ancestor
476- assert _is_excluded_skill_path (("skills" , "build" , "SKILL.md" )) is False
476+ assert _is_excluded_resource_path (("skills" , "build" , "SKILL.md" )) is False
477477 # Same for other excluded names used as skill directories
478- assert _is_excluded_skill_path (("skills" , "dist" , "SKILL.md" )) is False
479- assert _is_excluded_skill_path (("skills" , "vendor" , "SKILL.md" )) is False
478+ assert _is_excluded_resource_path (("skills" , "dist" , "SKILL.md" )) is False
479+ assert _is_excluded_resource_path (("skills" , "vendor" , "SKILL.md" )) is False
480480
481481 def test_skill_named_as_excluded_dir_at_top_level (self ):
482482 """A top-level skill named after an excluded dir should NOT be excluded."""
483- assert _is_excluded_skill_path (("build" , "SKILL.md" )) is False
484- assert _is_excluded_skill_path (("dist" , "SKILL.md" )) is False
483+ assert _is_excluded_resource_path (("build" , "SKILL.md" )) is False
484+ assert _is_excluded_resource_path (("dist" , "SKILL.md" )) is False
485485
486486 def test_empty_tuple_not_excluded (self ):
487487 """Edge case: empty parts tuple is not excluded (no excluded dir check)."""
488- assert _is_excluded_skill_path (()) is False
488+ assert _is_excluded_resource_path (()) is False
0 commit comments