betamaxpy / betamax

A VCR imitation designed only for python-requests.
https://betamax.readthedocs.io/en/latest/
Other
565 stars 62 forks source link

Add betamax_parametrized_recorder and _session #113

Closed hroncok closed 8 years ago

hroncok commented 8 years ago

Related to #112

No warnings yet.

hroncok commented 8 years ago

I've added a warning that is only happening when the user should care (i.e. when the cassette name would differ). No warning in the parametrized fixtures, because the user would get warnings in both, which I think is not nice.

My idea is:

  1. Merge this
  2. When 1.0.0 happens, change the default behavior (i.e. the betamax_recorder/session and betamax_parametrized_recorder/session will do the same thing), add DeprecationWarning for betamax_parametrized_recorder/session
  3. In reasonable future after 1.0.0, remove betamax_parametrized_recorder/session
sigmavirus24 commented 8 years ago

So it's possible (and a good idea) to set filters for warning so they appear at most once. I'd like to do that for both now because I'd like to completely remove betamax_parametrized_recorder in 1.0 instead of keeping it around and eventually removing it. Does that sound fairer to you? (Sorry I didn't bring up the idea of filtering the warnings to only show up once.)

hroncok commented 8 years ago

Added the second warning. The default warnings filter should be fine.

sigmavirus24 commented 8 years ago

@hroncok thanks so very much! This is fantastic!

hroncok commented 8 years ago

Thanks for this great tool.