Skip to content

fix: close test coverage gaps for mapper and executor - #23

Merged
codeasier merged 1 commit into
mainfrom
fix/close-test-gaps
Apr 17, 2026
Merged

codeasier merged 1 commit into
mainfrom
fix/close-test-gaps

Conversation

@codeasier

Copy link
Copy Markdown
Owner

📝 Description

Add missing test coverage:

Mapper (4 new tests):

  • map_to_model raises KeyError for unregistered factory (with message check)
  • map_all_to_model propagates KeyError
  • Bool string value conversion ("true", "false", "1", "0")
  • Conversion error keeps original value

Executor (3 new tests):

  • execute_on_all_devices happy path with multiple devices
  • execute_on_all_devices raises for missing template
  • execute_on_all_devices returns empty dict with no devices

🔗 Related Issue

Fixes #17

🧪 Testing

  • Tests added — 7 new test cases
  • Manual testing completed

✅ Checklist

  • Code follows project guidelines
  • No new warnings introduced
  • Changes tested locally

Add missing test cases:
- mapper: KeyError for unregistered model factory, bool string
  conversion, conversion error fallback
- executor: execute_on_all_devices happy path, template not found,
  empty device list

Closes #17
@codeasier
codeasier merged commit f2e639a into main Apr 17, 2026
5 checks passed
@codeasier
codeasier deleted the fix/close-test-gaps branch April 17, 2026 12:53
Sign up for free to 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.

[BUG] 测试缺口:execute_on_all_devices、mapper KeyError、bool 转换器

1 participant