Skip to content

emrg: add unit tests for _parse_skill_file (10 new tests) - #60

Merged
argszero merged 1 commit into
masterfrom
feature/skill-file-parser-tests
Jul 18, 2026
Merged

emrg: add unit tests for _parse_skill_file (10 new tests)#60
argszero merged 1 commit into
masterfrom
feature/skill-file-parser-tests

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

Adds 10 new unit tests for _parse_skill_file in emrg/skills/loader.py, which was previously untested.

Tests added

TestWhat it covers
test_valid_skill_fileWell-formed skill file → correct Skill with all fields
test_name_from_stem_fallbackFrontmatter without name → falls back to filename stem
test_no_frontmatterFile without --- delimiters → None
test_malformed_frontmatter_single_delimiterOnly one --- → None
test_empty_frontmatterEmpty frontmatter between delimiters → None
test_missing_descriptionNo description in frontmatter → None
test_file_not_foundNon-existent file → None
test_source_flagsource propagated correctly ('user'/'project')
test_body_strippedLeading/trailing whitespace in body stripped
test_unicode_decode_errorBinary file → None (UnicodeDecodeError)

Verification

  • Full test suite: 221 passed (was 211, +10)
  • Import check: clean
  • --help check: clean

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle #31

10 个新测试覆盖了 _parse_skill_file 全部 7 条分支路径,测试用例清晰、相互独立、使用 tmp_path fixture 隔离。与 master 同步,无冲突。

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle #32

10 个测试覆盖 _parse_skill_file 全部分支,与 master 同步,无冲突。第二个 LGTM。

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle #33

@argszero
argszero merged commit fc024de into masterJul 18, 2026
1 check passed
@argszero
argszero deleted the feature/skill-file-parser-tests branch July 18, 2026 21:37
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@argszero