VCR Manager
VS Code extension to manage VCR cassettes for Python tests using decorators like @vcr.use_cassette
, @vhs.use_cassette
, or @pytest.mark.vcr
.

Features
- Detects all common ways to define a cassette in Python tests.
- Shows "Show cassette" and "Delete cassette" buttons above each test.
- Supports explicit cassette paths and automatic path generation.
- Configurable root path for cassettes.
- Command palette integration to set the cassette root path.
Example Project Structure
my-django-project/
├── manage.py
├── api/
│ └── tests/
│ ├── test_product.py
│ └── cassettes/
│ └── test_product_controller/
│ └── test_get_product.yaml
Example Test Code
@vhs.use_cassette("/test_product/test_product_controller/test_get_product.yaml")
def test_get_product(self):
# Test code here
@pytest.mark.vcr()
def test_get_product(self):
# Test code here
Automatic Cassette Path Generation
If no path is provided in the decorator, the cassette path is automatically generated as:
cassettes/<test_file_name>/<test_function_name>.yaml
For example, for test_create_product
in test_product.py
, the cassette will be:
cassettes/test_product/test_create_product.yaml
Configuration
You can set the root path for cassettes in the extension settings or via the command palette (vcr.root
).


Usage
- Open a Python test file in VS Code.
- The extension will show buttons above each test using a VCR decorator.
- Use the buttons to show or delete the associated cassette file.
Support
Need help? Have a feature request? Found a bug?
Credits
Created by Dimitri Caramello