Skip to content

CLI Reference

karva

A Python test runner.

Usage

Text Only
1
karva <COMMAND>

Commands

karva test

Run tests

karva version

Display Karva's version

karva help

Print this message or the help of the given subcommand(s)

karva test

Run tests

Usage

Text Only
1
karva test [OPTIONS] [PATH]...

Arguments

PATHS

List of files, directories, or test functions to test [default: the project root]

Options

--color color

Control when colored output is used

Possible values:

  • auto: Display colors if the output goes to an interactive terminal
  • always: Always display colors
  • never: Never display colors
--config-file path

The path to a karva.toml file to use for configuration.

While ty configuration can be included in a pyproject.toml file, it is not allowed in this context.

May also be set with the KARVA_CONFIG_FILE environment variable.

--fail-fast

When set, the test will fail immediately if any test fails

--help, -h

Print help (see a summary with '-h')

--no-ignore

When set, .gitignore files will not be respected

--no-progress

When set, we will not show individual test case results during execution

--output-format output-format

The format to use for printing diagnostic messages

Possible values:

  • full: Print diagnostics verbosely, with context and helpful hints (default)
  • concise: Print diagnostics concisely, one per line
--quiet, -q

Use quiet output (or -qq for silent output)

--test-prefix test-prefix

The prefix of the test functions

--verbose, -v

Use verbose output (or -vv and -vvv for more verbose output)

karva version

Display Karva's version

Usage

Text Only
1
karva version

Options

--help, -h

Print help

karva help

Print this message or the help of the given subcommand(s)

Usage

Text Only
1
karva help [COMMAND]