Skip to content

Feature/only case insensitive#1621

Open
RuTh-git wants to merge 2 commits into
MFlowCode:masterfrom
RuTh-git:feature/only-case-insensitive
Open

Feature/only case insensitive#1621
RuTh-git wants to merge 2 commits into
MFlowCode:masterfrom
RuTh-git:feature/only-case-insensitive

Conversation

@RuTh-git

Copy link
Copy Markdown

Description

The --only flag in ./mfc.sh test --only <label> performed a case-sensitive
string comparison against test labels. Since MFC's test labels follow no
consistent capitalization convention (e.g. STL, slip, Sphere), users had
to remember the exact casing of every label to filter tests correctly. This PR
normalizes the label comparison to lowercase so any casing works.

Closes #1533.

Type of change (delete unused ones)

  • Bug fix

Testing

Manually verified the fix by running the following before and after the change:

  • ./mfc.sh test --only stl -j 1 → previously failed with "matched zero test
    cases", now passes
  • ./mfc.sh test --only STL -j 1 → passes (unchanged)
  • ./mfc.sh test --only Stl -j 1 → previously failed, now passes
  • ruff check toolchain/mfc/test/test.py → all style checks passed

Checklist

  • I added or updated tests for new behavior
  • I updated documentation if user-facing behavior changed

Copilot AI review requested due to automatic review settings June 30, 2026 04:22
@RuTh-git RuTh-git requested a review from sbryngelson as a code owner June 30, 2026 04:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Python toolchain’s ./mfc.sh test --only <label> filtering so test labels are matched case-insensitively, reducing user friction given inconsistent label capitalization across the suite.

Changes:

  • Make --only label matching case-insensitive by normalizing comparisons to lowercase.
  • Preserve existing UUID filtering behavior while adjusting label filtering logic.

check.add(case.get_uuid())

label_ok = all(label in check for label in labels) if labels else True
label_ok = all(label.lower() in {c.lower() for c in check} for label in labels) if labels else True
check.add(case.get_uuid())

label_ok = all(label in check for label in labels) if labels else True
label_ok = all(label.lower() in {c.lower() for c in check} for label in labels) if labels else True
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.39%. Comparing base (2d0d2fd) to head (5268c8a).
⚠️ Report is 57 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1621      +/-   ##
==========================================
- Coverage   60.63%   60.39%   -0.25%     
==========================================
  Files          73       83      +10     
  Lines       20219    19854     -365     
  Branches     2937     2955      +18     
==========================================
- Hits        12259    11990     -269     
+ Misses       5972     5863     -109     
- Partials     1988     2001      +13     

☔ View full report in Codecov by Harness.
📢 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Remove test --only case sensitivity

2 participants