Skip to content

adityardeshpande/pytest-cram

 
 

Repository files navigation

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

About

Run cram tests with pytest

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.0%
  • Shell 1.0%