How to specify `use_cassette`
See original GitHub issueWhen there are many tests using the same request/response, what’s the best way to ensure they all use the same cassette? The vcr.use_cassette
API clearly provides an option to name a cassette file. Is this exposed in pytest-vcr? e.g.
@pytest.mark.vcr(vcr_cassette_name='custom')
# or?
@pytest.mark.vcr(use_cassette='cassettes/custom.yaml')
Is this already noted in the read-the-docs? Where is it explained?
It seems like adding a decorator for VCR to a pytest-fixture does not work, or does it? If so, how?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
A modern guide to cassette tape players - Popular Science
To rewind something you're listening to, make sure you hold the cassette with the side you'll be listening to facing you. Then, you'll...
Read more >How to Use a Cassette Player | Techwalla
Step 2. Find the "Eject" button and press it. Before you put a cassette in the machine, use a pencil or your small...
Read more >How to Transfer Cassette Tape to Computer - wikiHow
1. Understand how cassette recording works. To record your cassette audio on your computer, you will need to connect your cassette player to...
Read more >How to Record Cassette Tapes : 7 Steps - Instructables
1. When recoding music, it's best to record on blank tapes. You can find tapes at places like hardware stores or thrift stores,...
Read more >Cassette Tapes - City of San Diego
If there is a tape inside, take it out and give it to a staff member. ... Once you are finished, right-click your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Currently passing the cassette name into the marker is not supported.
If the tests are grouped somehow (say, by class) you could override
vcr_cassette_name
for that scope:Otherwise you can use the
vcr
fixture to get a current VCR object:I’m not sure what you mean by adding a decorator for VCR - could you rephrase, or provide an example of what you’ve tried?
Might be fixed by #25