Skip to content
This repository has been archived by the owner on Dec 23, 2020. It is now read-only.

Latest commit

 

History

History
77 lines (52 loc) · 1.98 KB

README.rst

File metadata and controls

77 lines (52 loc) · 1.98 KB
Latest PyPI version Number of PyPI downloads Travis-CI build status AppVeyor build status Test coverage

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!

Installation

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.

Usage

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

py.test --nocram

To override the shell used by cram, do

py.test --shell="C:\git\bash.exe"

or set the CRAMSHELL environment variable

CRAMSHELL=/bin/bash py.test

If you wish to disable specific cram tests, list them in a .ini file

[pytest]
cramignore = file1.t
    pattern*.t