kevin1024 / vcrpy

Automatically mock your HTTP interactions to simplify and speed up testing
MIT License
2.72k stars 388 forks source link

Record on exception (continuation of PR #237) #668

Closed Terseus closed 2 years ago

Terseus commented 2 years ago

Fixes #205 Closes #237

This is a continuation of the PR #237. Given that the author @dan-passaro didn't answered in 3 years, I considered a good idea to take over their branch and make it able to be merged.

@neozenith since you reviewed #237 I'll await for your comments.

neozenith commented 2 years ago

I’ll delegate review to @jairhenrique as they seem to be the most recent active contributor.

Unfortunately I have other priorities come up and I’m no longer involved in this project sorry.

jairhenrique commented 2 years ago

@Terseus please, update the docs with this new param.

Terseus commented 2 years ago

Of course, I'll look into it.

Also will check what's happening with the pipeline, it worked on my machine™.

Terseus commented 2 years ago

Hi @jairhenrique

It turns out, it didn't worked in my machine after all :) I had a bug in my setup and the tests for pypy3 were skipped.

After that found out that the fail was because a bug introduced by the record_on_exception implementation in Pypy, it should be fixed now. Also I'd added a small section on how to use it in the "Advanced Features" page.

codecov-commenter commented 2 years ago

Codecov Report

Merging #668 (d943244) into master (60ac99c) will decrease coverage by 0.29%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #668      +/-   ##
==========================================
- Coverage   89.80%   89.50%   -0.30%     
==========================================
  Files          26       26              
  Lines        1726     1734       +8     
  Branches      257      310      +53     
==========================================
+ Hits         1550     1552       +2     
- Misses        140      145       +5     
- Partials       36       37       +1     
Impacted Files Coverage Δ
vcr/cassette.py 96.31% <100.00%> (+0.10%) :arrow_up:
vcr/config.py 95.03% <100.00%> (+0.06%) :arrow_up:
vcr/serializers/yamlserializer.py 80.00% <0.00%> (-20.00%) :arrow_down:
vcr/migration.py 73.46% <0.00%> (-3.07%) :arrow_down:
vcr/stubs/httpx_stubs.py 95.87% <0.00%> (-2.07%) :arrow_down:
vcr/stubs/__init__.py 93.06% <0.00%> (+0.57%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

jairhenrique commented 2 years ago

@Terseus I fix the CI error. Can you rebase with master again!?

Terseus commented 2 years ago

@jairhenrique Sure, done.

Edit: Lol now it fails because a 502 from httpbin.

jairhenrique commented 2 years ago

@Terseus thanks!