pytest-cram: Run cram tests with py.test
cram tests command line applications. pytest tests Python applications. pytest-cram tests Python command line applications by letting you write your Python API tests with pytest, and your command line tests in cram. Best of both worlds!
To install and use pytest-cram, do
pip install pytest-cram
pytest-cram works on Python 2.7 and 3.3+ and with cram versions 0.7 and up.
Once installed, all
.t files will be collected
and run with cram, so installation should be all that is needed.
If you wish to disable cram tests for an invocation of pytest, do
To override the shell used by cram, do
or set the
CRAMSHELL environment variable
If you wish to disable specific cram tests,
list them in a
[pytest] cramignore = file1.t pattern*.t