Skip to content

Fix Mac tests using mock - #3977

Open
Dreamsorcerer wants to merge 1 commit into
mainfrom
fix-mac-mock
Open

Fix Mac tests using mock#3977
Dreamsorcerer wants to merge 1 commit into
mainfrom
fix-mac-mock

Conversation

@Dreamsorcerer

@Dreamsorcerer Dreamsorcerer commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

This fixes the 2 tests failing on Mac due to Linux-only support.

@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This change makes Damiao adapter tests portable to macOS by supplying the platform-specific mocked CAN bus attribute when the wheel omits it. The installed Linux dependency still exports the production SocketCanBus API, so the Linux adapter path remains compatible.

Confidence Score: 5/5

Safe to merge: the installed Linux dependency exports the CAN bus API used by production.

No confirmed issues remain. The focused execution verified the current dependency contract and the behavior of the mocked platform path.

Files Needing Attention: None.

T-Rex T-Rex Logs

What T-Rex did

  • I validated that can-motor-control 0.0.8 currently exports SocketCanBus in production and confirmed the production API is intact.
  • In an isolated environment, I temporarily removed the export to compare the test mock against the production branch, and observed that the test mock with create=True supplies the expected attribute while the unmocked production branch would raise AttributeError if the API is absent.
  • I executed the socketcan-linux-validation workflow, examined the affected code locations in the test adapter and production adapter, and confirmed the isolated uv runs exited with code 0 while recording the command, working directory, status, and observed behavior.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "Fix Mac tests using mock" | Re-trigger Greptile

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main    #3977      +/-   ##
==========================================
- Coverage   77.92%   77.91%   -0.01%     
==========================================
  Files        1399     1399              
  Lines      132324   132328       +4     
  Branches    11492    11492              
==========================================
- Hits       103110   103108       -2     
- Misses      25947    25952       +5     
- Partials     3267     3268       +1     
Components Coverage Δ
Tests 94.71% <100.00%> (-0.02%) ⬇️
Flag Coverage Δ
OS-ubuntu-24.04-arm 74.26% <75.00%> (-0.01%) ⬇️
OS-ubuntu-latest 74.76% <75.00%> (-0.01%) ⬇️
Py-3.10 74.76% <75.00%> (-0.01%) ⬇️
Py-3.11 74.76% <75.00%> (+<0.01%) ⬆️
Py-3.12 74.76% <75.00%> (+<0.01%) ⬆️
Py-3.13 74.76% <75.00%> (-0.01%) ⬇️
Py-3.14 74.76% <75.00%> (+<0.01%) ⬆️
Py-3.14t 74.76% <75.00%> (+<0.01%) ⬆️
SelfHosted-Large 30.71% <25.00%> (-0.01%) ⬇️
SelfHosted-Linux 35.76% <75.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dimos/hardware/whole_body/damiao/test_adapter.py 97.94% <100.00%> (ø)
...are/whole_body/dual_openyam_damiao/test_adapter.py 100.00% <100.00%> (ø)
...hardware/whole_body/openarm_damiao/test_adapter.py 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Required CI checks have passed on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant