feat: move tool tests#2642
Conversation
Greptile SummaryThis PR removes the
Confidence Score: 5/5Safe to merge — this is a pure structural reorganisation with no logic changes; the Every No files require special attention beyond what was already flagged in earlier review rounds. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[pytest run] --> B{File name matches\ntest_*.py?}
B -- Yes --> C[Collected & run\nin normal suite]
B -- No\ntool_*.py --> D[Not collected automatically]
D --> E[Developer runs manually\npytest -s dimos/.../tool_file.py]
C --> F{Marker filter\nnot self_hosted/mujoco/\nself_hosted_large}
F -- Excluded --> G[Skipped in default run]
F -- Included --> H[Runs in CI & locally]
E --> I[Runs on demand\nno marker filtering needed]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[pytest run] --> B{File name matches\ntest_*.py?}
B -- Yes --> C[Collected & run\nin normal suite]
B -- No\ntool_*.py --> D[Not collected automatically]
D --> E[Developer runs manually\npytest -s dimos/.../tool_file.py]
C --> F{Marker filter\nnot self_hosted/mujoco/\nself_hosted_large}
F -- Excluded --> G[Skipped in default run]
F -- Included --> H[Runs in CI & locally]
E --> I[Runs on demand\nno marker filtering needed]
Reviews (2): Last reviewed commit: "feat: move tool tests" | Re-trigger Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #2642 +/- ##
==========================================
+ Coverage 71.10% 71.60% +0.50%
==========================================
Files 897 884 -13
Lines 80290 79199 -1091
Branches 7183 7124 -59
==========================================
- Hits 57089 56711 -378
+ Misses 21319 20605 -714
- Partials 1882 1883 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 15 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
Yes please. I feel like most of these are used to create something, like a file? Seems like they shouldn't be written as tests at all to me. Would make more sense to add a simple CLI interface into each file under a |
I think for some pytest is required because they use fixtures. That's why I just renamed them. |
b8ec6e9 to
67a9c80
Compare
Yeah, but the fixtures I saw looked like they were just for that one function, in which case it can just be converted to a regular function call. Bigger refactor though, I'm not saying to do it in this PR. |
Problem
tooltests are not real tests but they interfere withpytest. You always have to specify-m 'not tool'in one place or another.Closes DIM-1055
Solution
test_files which contain tool tests totool_. That way they re not picked up by pytest.uv run pytest -s dimos/memory2/tool_module.py