Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add tests for listdir_matching #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lguerard wants to merge 3 commits into imcf:devel
base: devel
Choose a base branch
Loading
from lguerard:fix/119-listdir-matching-tests

Conversation

@lguerard
Copy link
Contributor

@lguerard lguerard commented Jan 14, 2026

Fix #119

* Implement tests for non-recursive and recursive matching.
* Validate fullpath and regex matching functionality.
* Ensure correct sorting behavior for file names.
@lguerard lguerard changed the base branch from master to devel January 14, 2026 14:21
Copy link

codecov bot commented Jan 14, 2026
edited
Loading

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 27%. Comparing base (1a0f954) to head (170b066).
⚠️ Report is 45 commits behind head on devel.

Additional details and impacted files
@@ Coverage Diff @@
## devel #122 +/- ##
====================================
+ Coverage 25% 27% +2% 
====================================
 Files 25 25 
 Lines 1766 1766 
====================================
+ Hits 435 470 +35 
+ Misses 1331 1296 -35 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ehrenfeu ehrenfeu changed the title (削除) Fix/119 listdir matching tests (削除ここまで) (追記) Add tests for listdir_matching (追記ここまで) Jan 21, 2026
@ehrenfeu ehrenfeu added the unit testing A unit test should be created label Jan 21, 2026
@ehrenfeu ehrenfeu moved this to In review in imcflibs Jan 21, 2026
@ehrenfeu ehrenfeu self-assigned this Jan 21, 2026
@ehrenfeu ehrenfeu self-requested a review January 21, 2026 11:28
Copy link
Member

As indicated by codecov, there are still quite some paths in the function that are not covered by tests:

https://app.codecov.io/gh/imcf/python-imcflibs/pull/122/blob/src/imcflibs/pathtools.py#L223

To me, the level of complexity / conditional nesting / ... of listdir_matching is so high that sooner or later it will blow up if it's not fully covered.

* Implement test for invalid regex returning an empty list.
* Add test for recursive regex matching that verifies absolute paths.
@ehrenfeu ehrenfeu added this to the 2.0.0 milestone Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ehrenfeu ehrenfeu ehrenfeu approved these changes

Labels

unit testing A unit test should be created

Projects

Status: In review

Milestone

2.0.0

Development

Successfully merging this pull request may close these issues.

Create tests for imcflibs.pathtools.listdir_matching

AltStyle によって変換されたページ (->オリジナル) /