pytest-vcr 1.0.2


pip install pytest-vcr

  Latest version

Released: Apr 26, 2019

Project Links

Meta
Author: Tomasz Kontusz
Maintainer: Tomasz Kontusz

Classifiers

Development Status
  • 5 - Production/Stable

Framework
  • Pytest

Intended Audience
  • Developers

Topic
  • Software Development :: Testing

Programming Language
  • Python
  • Python :: 2
  • Python :: 2.7
  • Python :: 3
  • Python :: 3.4
  • Python :: 3.5
  • Python :: 3.6
  • Python :: 3.7
  • Python :: Implementation :: CPython
  • Python :: Implementation :: PyPy

Operating System
  • OS Independent

License
  • OSI Approved :: MIT License

See Build Status on Travis CI See Build Status on AppVeyor See the documentation

Py.test plugin for managing VCR.py cassettes.

Quick Start

Install the plugin:

pip install pytest-vcr

Annotate your tests:

@pytest.mark.vcr()
def test_iana():
    response = urlopen('http://www.iana.org/domains/reserved').read()
    assert b'Example domains' in response

And that’s it! A new file cassettes/test_iana.yaml will be created next to your test file on the first run. This file should be committed to a VCS.

For more examples and configuration options see the documention on ReadTheDocs.

Wheel compatibility matrix

Platform Python 2 Python 3
any

Files in release

Extras: None
Dependencies:
pytest (>=3.6.0)
vcrpy