Skip to content

Conversation

@lguerard
Copy link
Contributor

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
@codecov
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 27%. Comparing base (1a0f954) to head (170b066).
⚠️ Report is 20 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
@ehrenfeu
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

Labels

unit testing A unit test should be created

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

Create tests for imcflibs.pathtools.listdir_matching

2 participants