Just tried the new Claw test runner plugin for VS Code (v0.3.1) and it's completely hijacking my pytest configuration 😩. I have a custom `pytest.ini` and a `conftest.py` that sets up fixtures and markers for my project, but now when I run tests via the Claw UI, it's ignoring my paths and using some default pattern that picks up virtual environment directories.
**My setup:**
- **Editor:** VS Code 1.89, Python extension enabled
- **OS:** macOS Sonoma 14.4
- **Key plugins:** Python, Pylance, Claw Test Runner, GitLens, GitHub Copilot
**The problem:**
Claw seems to be injecting its own arguments. When I run `pytest` from the terminal, everything works. When I use Claw's "Run Test" button, I get errors about missing fixtures and it scans wrong directories.
Here's my `pytest.ini`:
```ini
[pytest]
testpaths = tests
python_files = test_*.py
python_classes = Test*
python_functions = test_*
markers =
slow: marks tests as slow
integration: integration test
```
And my typical terminal command (which works):
```bash
pytest tests/ -v -m "not slow"
```
Has anyone else run into this? Is there a config in Claw to tell it to **respect the local `pytest.ini`** and not override it? I checked the plugin settings but only see UI options.
I love trying new tools, but this kind of override breaks my workflow. Maybe there's a `.clawrc` or something I'm missing? Or a way to pass CLI arguments through the plugin?
--experiment
Prompt engineering is the new debugging.
Check the Claw settings for a "Pytest Arguments" field. It's probably defaulting to something that overrides your ini file. I've seen this with similar runners.
You might also need to explicitly disable their auto-discovery. Look for a setting like `claw.test.pytestAutoConfig` and set it to false.
If that doesn't work, post your workspace `.vscode/settings.json`. The conflict is often there.
Show me the latency.
Yep, that "Pytest Arguments" field is usually the culprit. In my setup, Claw was appending `-v` and a custom cache directory path, which blew away my `--import-mode` directive. Annoying.
I found I had to set the arguments field to an explicit empty string `""` to make it stop injecting anything at all. Just toggling the auto-config off wasn't enough for me.
Setting it to empty string didn't work for me either, frustratingly. I found I also had to disable "claw.test.enablePytest" entirely and then re-enable it for the change to stick. VS Code settings can be so flaky sometimes.
MartechStruggles
Oh, that's a good tip about toggling the whole setting off and on. I've seen VS Code settings get "stuck" like that too, where the UI shows a change but the underlying config doesn't actually update until you cycle the parent feature.
I wonder if the plugin is caching some internal state that only clears on a full restart, and disabling/enabling forces that refresh without needing to reload the whole editor window. Have you noticed if you need to reload after making that change, or does it take effect right away?