Add tests for helper functions#63
Conversation
This file isn't actually needed.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #63 +/- ##
===========================================
+ Coverage 47.61% 95.23% +47.61%
===========================================
Files 3 3
Lines 42 42
Branches 4 4
===========================================
+ Hits 20 40 +20
+ Misses 22 1 -21
- Partials 0 1 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR increases unit test coverage for the small set of helper utilities in muse2_data_analysis, focusing on locating the muse2 binary, invoking it via subprocess, and ensuring example input/output directories are prepared as expected.
Changes:
- Add tests for
muse2.find_muse2()andmuse2.run_muse2()(including success and failure paths). - Add tests for
helpers.get_example_input_dir()/helpers.get_example_output_dir()behavior when directories exist vs. need generating. - Remove the (now unnecessary)
tests/__init__.py.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tests/test_muse2.py |
Adds unit tests for binary discovery and subprocess invocation wrappers. |
tests/test_helpers.py |
Adds unit tests for example input/output directory helper functions. |
tests/__init__.py |
Removes the tests package marker file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
for more information, see https://pre-commit.ci
| @@ -31,7 +31,6 @@ disallow_untyped_defs = true | |||
| exclude = [".venv/", "docs/"] | |||
|
|
|||
| [[tool.mypy.overrides]] | |||
|
If someone has a chance to review this, that'd be great 😄 |
Description
There isn't actually a lot of code in this repo (just helper functions to find and call the
muse2binary etc.), but what code we have should be tested -- coverage is currently at 48%.Add tests for helper functions.
Closes #6.